Skip to content

Commit 7212640

Browse files
committed
Merge pull request #16 from cryogenian/window-global
window/global
2 parents a42d51a + a3abb7b commit 7212640

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Routing.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@ exports.hashChanged = function(handler) {
1515
};
1616
};
1717

18-
exports.decodeURIComponent = window.decodeURIComponent;
18+
exports.decodeURIComponent = function(str) {
19+
if (typeof window !== "undefined") {
20+
return window.decodeURIComponent(str);
21+
} else {
22+
return global.decodeURIComponent(str);
23+
}
24+
};

0 commit comments

Comments
 (0)