Skip to content

Commit

Permalink
plugin dir check
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed May 12, 2024
1 parent 56c5903 commit 29fbbff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class Api {
}
})
.then(() => {
if (plugin != null && fs.existsSync(path.join(plugin.dir, 'Package.swift'))) {
if (plugin != null && plugin.dir && fs.existsSync(path.join(plugin.dir, 'Package.swift'))) {
return this.updatePackageSwift(plugin, 'add');
}
})
Expand Down Expand Up @@ -331,7 +331,7 @@ class Api {
}
})
.then(() => {
if (plugin != null && fs.existsSync(path.join(plugin.dir, 'Package.swift'))) {
if (plugin != null && plugin.dir && fs.existsSync(path.join(plugin.dir, 'Package.swift'))) {
return this.updatePackageSwift(plugin, 'remove');
}
})
Expand Down

0 comments on commit 29fbbff

Please sign in to comment.