mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Guard code for context.mode
In case this is somehow called before initialization is complete It happens rarely when restoring the initial changes and deferring rendering
This commit is contained in:
@@ -24,7 +24,8 @@ export function uiModes(context) {
|
||||
|
||||
|
||||
function editable() {
|
||||
return context.editable() && context.mode().id !== 'save';
|
||||
var mode = context.mode();
|
||||
return context.editable() && mode && mode.id !== 'save';
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user