Skip to content

Commit 83dbcb1

Browse files
Handle when addons are installed elsewhere (#1686)
1 parent fd60552 commit 83dbcb1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,10 @@ module.exports = {
385385
_documentingAddon() {
386386
let addon;
387387
if (this._documentingAddonAt()) {
388-
addon = this.project.addons.find(
389-
(a) => a.root === this._documentingAddonAt(),
388+
const pkg = require(
389+
path.join(this._documentingAddonAt(), 'package.json'),
390390
);
391+
addon = this.project.addons.find((a) => a.name === pkg.name);
391392
if (!addon) {
392393
throw new Error(
393394
`You set documentingAddonAt to point at ${this._documentingAddonAt()} but that addon does not appear to be present in this app.`,

0 commit comments

Comments
 (0)