Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Commit 0988a62

Browse files
committed
update AppInstall to latest so it actually works as expected
1 parent 1bef52f commit 0988a62

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

Diff for: js/lib/AppInstall.js

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
(function() {
22

3-
// Mortar AppInstall version 0.0.2
4-
var _window = {
5-
'location': {
3+
// Mortar AppInstall version 0.0.3
4+
var _window;
5+
var isBrowser = this.hasOwnProperty('document');
6+
7+
if(isBrowser) {
8+
_window = this;
9+
} else {
10+
_window = {
11+
'location': {
612
'host': 'example.com',
713
'protocol': 'http:',
814
'pathname': '/example'
9-
},
10-
'navigator': {}
11-
};
15+
},
16+
'navigator': {}
17+
};
18+
}
19+
1220

1321
function setupMockups(win) {
1422
_window = win;
1523
}
1624

25+
1726
function guessManifestPath() {
1827

1928
var loc = _window.location;
@@ -94,3 +103,4 @@
94103
}
95104

96105
}).call(this);
106+

0 commit comments

Comments
 (0)