1
0
Fork 0

Merge pull request #3942 from BenJamesBen/constant-option-warning

fix(shared): Silence no-menu warnings for constant options
This commit is contained in:
Joost De Cock 2023-05-22 09:57:22 +02:00 committed by GitHub
commit 9f72324d46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,7 +187,7 @@ export const optionsMenuStructure = (options) => {
if (!options) return options
const sorted = {}
for (const [name, option] of Object.entries(options)) {
sorted[name] = { ...option, name }
if (typeof option === 'object') sorted[name] = { ...option, name }
}
const menu = {}