From 7ef86fb4a5d12edef3fc0231f22f6e31edd9a08c Mon Sep 17 00:00:00 2001 From: Sebastian Gronewold Date: Tue, 12 Aug 2014 10:33:41 +0000 Subject: [PATCH] Reverted changes as they have already been pull requested --- angular-local-storage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/angular-local-storage.js b/angular-local-storage.js index 0a8ee3f..8ebbe0b 100644 --- a/angular-local-storage.js +++ b/angular-local-storage.js @@ -75,6 +75,10 @@ angularLocalStorage.provider('localStorageService', function() { // When Angular's $document is not available if (!$document) { $document = document; + } else { + // unwrapping the jquery encapsulated document to access cookies + // (see http://www.bennadel.com/blog/2630-accessing-document-properties-in-angularjs.htm) + $document = $document[0]; } // If there is a prefix set in the config lets use that with an appended period for readability