Fix #964 Adding hide sidebars button to top toolbar causes TypeError on next open

This commit is contained in:
JannisX11 2021-07-21 14:04:04 +02:00
parent cc73aa8a9c
commit d7881f6da1

View File

@ -1593,7 +1593,7 @@ const BARS = {
new Action('toggle_sidebars', {
icon: 'view_array',
category: 'view',
condition: () => !Blockbench.isMobile && !Mode.selected.hide_sidebars,
condition: () => !Blockbench.isMobile && Mode.selected && !Mode.selected.hide_sidebars,
keybind: new Keybind({key: 'b', ctrl: true}),
click: function () {
let status = !Prop.show_left_bar;