From e7619c638f8647a9d12147a104f2466aacc67ef2 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 1 Sep 2022 10:25:51 +0200 Subject: [PATCH] refactor --- src/core/customBlock.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/customBlock.ts b/src/core/customBlock.ts index c9b57ba91..51fb48b6d 100644 --- a/src/core/customBlock.ts +++ b/src/core/customBlock.ts @@ -13,11 +13,7 @@ export async function getRouteBlock(path: string, options: ResolvedOptions) { if (!blockStr) return - let result - - if (blockStr) { - result = parseCustomBlock(blockStr, path, options) - } + let result = parseCustomBlock(blockStr, path, options) // validation if (result) { @@ -72,7 +68,7 @@ function parseCustomBlock( } } else { console.error( - `Invalid "lang" of <${block.type}> in ${filePath}. Supported languages are: json5, json, yaml, yml.` + `⚠️ unplugin-vue-router: Invalid "lang" of <${block.type}> in ${filePath}. Supported languages are: json5, json, yaml, yml.` ) } }