work-around for weird localStorage behavior in Safari OS X/iOS
authorAlexander Ebert <ebert@woltlab.com>
Tue, 25 Nov 2014 19:37:15 +0000 (20:37 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 25 Nov 2014 19:37:15 +0000 (20:37 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js

index be50ecfc01a811295537d12e9c07147b0bf535a8..35d37ef0e33d3b02764b07c54c783f379e4f47b1 100644 (file)
@@ -443,7 +443,7 @@ RedactorPlugins.wutil = function() {
                                                        $value = { timestamp: 0 };
                                                }
                                                
-                                               if (!$value.timestamp || $value.timestamp < $oneWeekAgo) {
+                                               if ($value === null || !$value.timestamp || $value.timestamp < $oneWeekAgo) {
                                                        try {
                                                                localStorage.removeItem($key);
                                                        }