Skip to content

Commit e3255dd

Browse files
committed
Restore universal app support
Restores functionality introduced in #22 but broken by #71
1 parent 9c2ee2c commit e3255dd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/index.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
// setup jQuery
44
var $;
5-
if (typeof window !== 'undefined' && window && window.jQuery) {
6-
$ = window.jQuery;
5+
if (typeof window !== 'undefined' && window) {
6+
if (window.jQuery) {
7+
$ = window.jQuery;
8+
} else {
9+
$ = require('jquery')
10+
window.jQuery = $;
11+
}
712
} else {
813
$ = require('jquery');
9-
window.jQuery = $;
1014
}
1115

1216
var BS = require('bootstrap');

0 commit comments

Comments
 (0)