@@ -16,7 +16,7 @@ import 'bootstrap/js/dist/dropdown';
1616import 'bootstrap/js/dist/modal' ;
1717import '@selectize/selectize' ;
1818import '@selectize/selectize/dist/css/selectize.bootstrap4.css' ;
19- const nestedProperty = require ( 'nested-property' ) ;
19+ import nestedProperty from 'nested-property' ;
2020import { isEmpty , deleteEmptyKeyVals , isEmptyUnitVal , setJSON } from '../lib/utils/general' ;
2121import YAML from 'yaml' ;
2222import {
@@ -517,7 +517,7 @@ class Toolbar {
517517 if ( ! this . file_extensions . includes ( ext ) ) {
518518 this . showError (
519519 'open' ,
520- `Only ${ acceptedExts . join ( ', ' ) } files are supported`
520+ `Only ${ this . file_extensions . join ( ', ' ) } files are supported`
521521 ) ;
522522 return ;
523523 }
@@ -570,7 +570,6 @@ class Toolbar {
570570 }
571571 catch ( error ) {
572572 throw new Error ( 'Invalid JSON data' , error ) ;
573- return false ;
574573 }
575574
576575 // Validate whether data file has minimum necessary Schema components.
@@ -676,7 +675,6 @@ class Toolbar {
676675 }
677676 catch ( error ) {
678677 throw new Error ( 'Invalid spreadsheet data' , error ) ;
679- return false ;
680678 }
681679
682680 // First construct a set of data tables from input file's perspective
@@ -1017,9 +1015,10 @@ class Toolbar {
10171015 if ( isEmpty ( value_list ) )
10181016 return value ;
10191017
1020- if ( ! ( value in value_list ) )
1018+ if ( ! ( value in value_list ) ) {
10211019 console . warn ( `${ value } not in slot.sources` , value_list ) ;
10221020 return value ;
1021+ }
10231022
10241023 if ( file_extension === 'json' )
10251024 return value ; // Why this case?
0 commit comments