Skip to content

Commit

Permalink
fix adding useRouter, useRoute, useDevice and other plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
bippan1407 committed May 6, 2024
1 parent 09aeb8b commit c1bb278
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codemod.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ class Codemod {
};

checkIfDataIsPresent() {
if (!this.vueFileData.allProperties.includes('data') && (Object.keys(this.vueFileData.vuexGetters).length || Object.keys(this.vueFileData.vuexActions).length || Object.keys(this.vueFileData.componentRefNames).length)) {
if (!this.vueFileData.allProperties.includes('data') && (Object.keys(this.vueFileData.vuexGetters).length || Object.keys(this.vueFileData.vuexActions).length || Object.keys(this.vueFileData.componentRefNames).length) ||
this.vueFileData.isRouterPresent || this.vueFileData.isRoutePresent
|| this.vueFileData.isDevicePresent || this.vueFileData.pluginNames.length) {
this.vueFileData.allProperties.push('data')
}
}
Expand Down

0 comments on commit c1bb278

Please sign in to comment.