Skip to content

Commit 0a256f3

Browse files
committed
Merge pull request #105 from egyptianbman/patch-1
Check for document being in [0] key of $document
2 parents 2c57fdf + 7ac1e52 commit 0a256f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

angular-local-storage.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ angularLocalStorage.provider('localStorageService', function() {
7575
// When Angular's $document is not available
7676
if (!$document) {
7777
$document = document;
78+
} else if ($document[0]) {
79+
$document = $document[0];
7880
}
7981

8082
// If there is a prefix set in the config lets use that with an appended period for readability

0 commit comments

Comments
 (0)