fix: 修复只有开源部分的前端报错问题

This commit is contained in:
CaptainB 2022-10-11 16:21:34 +08:00 committed by 刘瑞斌
parent e73b56eda9
commit d35240e542
2 changed files with 4 additions and 1 deletions

View File

@ -80,6 +80,9 @@ export default {
}, },
watch: { watch: {
projectId() { projectId() {
if (!hasLicense()) {
return;
}
this.currentVersion = null; this.currentVersion = null;
this.getVersionOptionList(this.projectId); this.getVersionOptionList(this.projectId);
this.isVersionEnable(); this.isVersionEnable();

View File

@ -1,7 +1,7 @@
function enableModules(...modules) { function enableModules(...modules) {
for (let module of modules) { for (let module of modules) {
let modules = JSON.parse(localStorage.getItem('modules')); let modules = JSON.parse(localStorage.getItem('modules'));
if (modules[module] === 'DISABLE') { if (modules && modules[module] === 'DISABLE') {
return false; return false;
} }
} }