File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,10 +87,10 @@ export default class BlockTool extends BaseTool<IBlockTool> {
8787 const userToolboxSettings = this . config [ UserSettings . Toolbox ] ;
8888
8989 if ( _ . isEmpty ( toolToolboxSettings ) ) {
90- return ;
90+ return [ ] ;
9191 }
9292 if ( userToolboxSettings === false ) {
93- return ;
93+ return [ ] ;
9494 }
9595 /**
9696 * Return tool's toolbox settings if user settings are not defined
Original file line number Diff line number Diff line change @@ -255,17 +255,14 @@ export default class Toolbox extends EventsDispatcher<ToolboxEvent> {
255255 . from ( this . tools . values ( ) )
256256 . reduce ( ( result , tool ) => {
257257 const toolToolboxSettings = tool . toolbox ;
258-
259- if ( toolToolboxSettings ) {
260- const validToolboxSettings = toolToolboxSettings . filter ( item => {
261- return this . areToolboxSettingsValid ( item , tool . name ) ;
262- } ) ;
263-
264- result . push ( {
265- ...tool ,
266- toolbox : validToolboxSettings ,
267- } ) ;
268- }
258+ const validToolboxSettings = toolToolboxSettings . filter ( item => {
259+ return this . areToolboxSettingsValid ( item , tool . name ) ;
260+ } ) ;
261+
262+ result . push ( {
263+ ...tool ,
264+ toolbox : validToolboxSettings ,
265+ } ) ;
269266
270267 return result ;
271268 } , [ ] ) ;
You can’t perform that action at this time.
0 commit comments