Fix loading if coEditing==null
This commit is contained in:
parent
0edf12b186
commit
3a2c2513cf
|
@ -473,7 +473,7 @@ define([
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
|
@ -1549,10 +1549,10 @@ define([
|
|||
|
||||
// change = true by default in editor
|
||||
this.appOptions.canLiveView = true; //params.asc_canLiveViewer(); // viewer: change=false by default when no flag canLiveViewer (i.g. old license), change=true by default when canLiveViewer==true
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit &&
|
||||
(this.appOptions.canLiveView ? !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) :
|
||||
(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true)) ;
|
||||
(this.appOptions.canLiveView ? !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) :
|
||||
(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true)) ;
|
||||
|
||||
this.loadCoAuthSettings();
|
||||
this.applyModeCommonElements();
|
||||
|
|
|
@ -133,7 +133,7 @@ class MainController extends Component {
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
let enable = !this.editorConfig.customization || (this.editorConfig.customization.macros !== false);
|
||||
|
|
|
@ -430,7 +430,7 @@ define([
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
|
@ -1196,10 +1196,10 @@ define([
|
|||
|
||||
// change = true by default in editor
|
||||
this.appOptions.canLiveView = true; //params.asc_canLiveViewer(); // viewer: change=false by default when no flag canLiveViewer (i.g. old license), change=true by default when canLiveViewer==true
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit &&
|
||||
(this.appOptions.canLiveView ? !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) :
|
||||
(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true)) ;
|
||||
(this.appOptions.canLiveView ? !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) :
|
||||
(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true)) ;
|
||||
|
||||
this.loadCoAuthSettings();
|
||||
this.applyModeCommonElements();
|
||||
|
|
|
@ -124,7 +124,7 @@ class MainController extends Component {
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
let enable = !this.editorConfig.customization || (this.editorConfig.customization.macros !== false);
|
||||
|
|
|
@ -504,7 +504,7 @@ define([
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
|
@ -1285,10 +1285,10 @@ define([
|
|||
// change = true by default in editor
|
||||
this.appOptions.canLiveView = true; //params.asc_canLiveViewer(); // viewer: change=false by default when no flag canLiveViewer (i.g. old license), change=true by default when canLiveViewer==true
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && this.appOptions.canCoAuthoring &&
|
||||
!(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit &&
|
||||
(this.appOptions.canLiveView ? !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) :
|
||||
(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true)) ;
|
||||
(this.appOptions.canLiveView ? !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) :
|
||||
(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true)) ;
|
||||
|
||||
if (!this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge && !this.appOptions.isEditOle) {
|
||||
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
|
||||
|
|
|
@ -171,7 +171,7 @@ class MainController extends Component {
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
const appOptions = this.props.storeAppOptions;
|
||||
|
|
Loading…
Reference in a new issue