Open pdorgambide opened 5 years ago
A hack that would work without changing the code would be:
const items = $localstorage;
$localstorage.$reset();
$localstorage.$apply(); // force storing the data to make sure _last$storage is overwritten.
$localstorage.$reset(items);
Bug: Browser storage mantein clear when $localstorage.$reset and try to load the same data.
$localstorage.$reset($localstorage); // Brower Local Storage are empty
The cause: On $reset the _last$storage variable is not clear and this make that on $apply the conditon always is true:
if (!angular.equals($storage, _last$storage))
Fix (suggested):