File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
1
import { AbstractEditor } from '../editor.js'
2
- import { extend , trigger , hasOwnProperty } from '../utilities.js'
2
+ import { extend , hasOwnProperty , trigger } from '../utilities.js'
3
3
import rules from './object.css.js'
4
4
5
5
export class ObjectEditor extends AbstractEditor {
@@ -417,14 +417,17 @@ export class ObjectEditor extends AbstractEditor {
417
417
/* Increase the grid width to account for padding */
418
418
this . maxwidth += 1
419
419
420
- this . schema . defaultProperties . forEach ( key => {
421
- this . addObjectProperty ( key , true )
420
+ /* Check for array (eg. meta-schema options is an object) */
421
+ if ( Array . isArray ( this . schema . defaultProperties ) ) {
422
+ this . schema . defaultProperties . forEach ( key => {
423
+ this . addObjectProperty ( key , true )
422
424
423
- if ( this . editors [ key ] ) {
424
- this . minwidth = Math . max ( this . minwidth , ( this . editors [ key ] . options . grid_columns || this . editors [ key ] . getNumColumns ( ) ) )
425
- this . maxwidth += ( this . editors [ key ] . options . grid_columns || this . editors [ key ] . getNumColumns ( ) )
426
- }
427
- } )
425
+ if ( this . editors [ key ] ) {
426
+ this . minwidth = Math . max ( this . minwidth , ( this . editors [ key ] . options . grid_columns || this . editors [ key ] . getNumColumns ( ) ) )
427
+ this . maxwidth += ( this . editors [ key ] . options . grid_columns || this . editors [ key ] . getNumColumns ( ) )
428
+ }
429
+ } )
430
+ }
428
431
}
429
432
430
433
/* Sort editors by propertyOrder */
You can’t perform that action at this time.
0 commit comments