Skip to content

Commit

Permalink
Merge branch 'master' into issues/254
Browse files Browse the repository at this point in the history
  • Loading branch information
yotamberk authored Jan 21, 2020
2 parents 28bab24 + 2861085 commit 842f25e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 10 additions & 5 deletions lib/DOMutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
4 changes: 1 addition & 3 deletions lib/timeline/component/ItemSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 842f25e

Please sign in to comment.