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

Commit e992c32

Browse files
committed
fixes #117 guard onstorage attachment
1 parent 5a2b0bd commit e992c32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/idle/idle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ angular.module('ngIdle.idle', ['ngIdle.keepalive', 'ngIdle.localStorage'])
261261
};
262262

263263
if ($window.addEventListener) $window.addEventListener('storage', wrap, false);
264-
else $window.attachEvent('onstorage', wrap);
264+
else if ($window.attachEvent) $window.attachEvent('onstorage', wrap);
265265

266266
return svc;
267267
}

0 commit comments

Comments
 (0)