diff --git a/lib/DOMutil.js b/lib/DOMutil.js index 8969b0d046..55b7344d40 100644 --- a/lib/DOMutil.js +++ b/lib/DOMutil.js @@ -224,10 +224,15 @@ export function drawBar (x, y, width, height, className, JSONcontainer, svgConta * @returns {string} */ export function getNavigatorLanguage() { - if (!navigator) return 'en'; - if (navigator.languages && navigator.languages.length) { - return navigator.languages; - } else { - return navigator.userLanguage || navigator.language || navigator.browserLanguage || 'en'; + try { + if (!navigator) return 'en'; + if (navigator.languages && navigator.languages.length) { + return navigator.languages; + } else { + return navigator.userLanguage || navigator.language || navigator.browserLanguage || 'en'; + } + } + catch(error) { + return 'en'; } } diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 6deacf124f..89fe11257b 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -2288,9 +2288,7 @@ class ItemSet extends Component { */ _onUpdateItem(item) { if (!this.options.selectable) return; - if (!this.options.editable.updateTime) return; - if (!this.options.editable.updateGroup) return; - + if (!this.options.editable.updateTime && !this.options.editable.updateGroup) return; const me = this;