Fix the pad app when cryptpad is in an iframe

This commit is contained in:
yflory
2017-09-06 11:03:20 +02:00
parent f06683e949
commit d98bbf7df9
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ define([
return Math.random().toString(16).replace('0.', '') + Math.random().toString(16).replace('0.', '');
};
var create = function (ow, cb) {
var create = function (ow, cb, isSandbox) {
var otherWindow;
var handlers = {};
var queries = {};
@@ -130,7 +130,7 @@ define([
console.log(msg);
}
});
if (window !== window.top) {
if (isSandbox) {
// we're in the sandbox
otherWindow = ow;
cb(chan);