Skip to content

Commit 5605317

Browse files
committed
refactor(ionicNamespace): create window.ionic
Build processes may also be using the window.ionic object, but it’ll have to create its own because ionic.js may not have run yet. Use the existing window.ionic obj if it exists, otherwise create it.
1 parent 150f116 commit 5605317

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

js/ionic.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11

2-
// Create namespaces
3-
//
4-
window.ionic = {
5-
controllers: {},
6-
views: {},
7-
version: '<%= pkg.version %>'
8-
};
2+
// Create global ionic obj and its namespaces
3+
// build processes may have already created an ionic obj
4+
window.ionic = window.ionic || {};
5+
window.ionic.views = {};
6+
window.ionic.version = '<%= pkg.version %>';

0 commit comments

Comments
 (0)