Skip to content

Commit

Permalink
fix: optimize getVueVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
Chieffo2021 committed Jul 23, 2021
1 parent 1df395f commit 40276b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export function getVueVersion (rootDir: string): number {
if (jsonObj === '') {
return vueVersion
}
return Number(minVersion(jsonObj.version).split('.')[0])
return minVersion(jsonObj.version).major
}
return Number(minVersion(dep.vue).split('.')[0])
return minVersion(dep.vue).major
}

function getVueDependency (jsonObj: any) : any {
Expand Down

0 comments on commit 40276b3

Please sign in to comment.