Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Sep 1, 2022
1 parent 50cbfaa commit e7619c6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/core/customBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.`
)
}
}

0 comments on commit e7619c6

Please sign in to comment.