Merge pull request #912 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2021-06-02 15:50:49 +03:00 committed by GitHub
commit ac109145b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -866,7 +866,7 @@
path += app + "/";
path += (config.type === "mobile" || isSafari_mobile)
? "mobile"
: (config.type === "embedded" || (app=='documenteditor') && (config.document.permissions.fillForms===true) && (config.document.permissions.edit === false) && (config.editorConfig.mode !== 'view'))
: (config.type === "embedded" || (app=='documenteditor') && config.document.permissions && (config.document.permissions.fillForms===true) && (config.document.permissions.edit === false) && (config.editorConfig.mode !== 'view'))
? "embed"
: "main";

View file

@ -151,7 +151,7 @@ if (window.Common === undefined) {
var _onMessage = function(msg) {
// TODO: check message origin
if (msg.origin !== window.parentOrigin && msg.origin !== window.location.origin) return;
if (msg.origin !== window.parentOrigin && msg.origin !== window.location.origin && !(msg.origin==="null" && (window.parentOrigin==="file://" || window.location.origin==="file://"))) return;
var data = msg.data;
if (Object.prototype.toString.apply(data) !== '[object String]' || !window.JSON) {