mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 23:36:11 +02:00
🐛 Fix advanced compilation of util.globals ns.
This commit is contained in:
parent
43d32af540
commit
6df976d1f3
1 changed files with 14 additions and 16 deletions
|
@ -21,22 +21,20 @@
|
||||||
goog.provide("app.util.globals");
|
goog.provide("app.util.globals");
|
||||||
|
|
||||||
goog.scope(function() {
|
goog.scope(function() {
|
||||||
var win;
|
app.util.globals.window = (function() {
|
||||||
if (typeof goog.global.window !== "undefined") {
|
if (typeof goog.global.window !== "undefined") {
|
||||||
win = goog.global.window;
|
return goog.global.window;
|
||||||
} else {
|
} else {
|
||||||
win = {};
|
return {};
|
||||||
}
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
app.util.globals.window = win;
|
app.util.globals.location = (function() {
|
||||||
|
if (typeof goog.global.location !== "undefined") {
|
||||||
var loc;
|
return goog.global.location;
|
||||||
if (typeof goog.global.location !== "undefined") {
|
} else {
|
||||||
loc = goog.global.location;
|
return {};
|
||||||
} else {
|
}
|
||||||
loc = {};
|
})();
|
||||||
}
|
|
||||||
|
|
||||||
app.util.globals.location = loc;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue