Skip to content

Commit

Permalink
feat(addon): enable string value for option keys
Browse files Browse the repository at this point in the history
  • Loading branch information
aurrelhebert authored and hsablonniere committed Oct 16, 2024
1 parent 0b9e4d9 commit 92a3a2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/models/addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ export function parseAddonOptions (options) {
else if (value === 'false' || value === 'disabled') {
formattedValue = 'false';
}
else if (typeof key === 'string') {
formattedValue = value;
}
else {
throw new Error(`Can't parse option value: ${value}. Accepted values are: enabled, disabled, true, false`);
}
Expand Down

0 comments on commit 92a3a2e

Please sign in to comment.