FIX: delete dataset doesn’t work on safari

FIX: delete dataset doesn’t work on safari

diff --git a/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6 b/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6
index 5a2b514..c159fe6 100644
--- a/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6
+++ b/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6
@@ -24,7 +24,7 @@ function hide(image) {
   image.removeAttribute("srcset");
 
   image.src = image.dataset.smallUpload || LOADING_DATA;
-  delete image.dataset.smallUpload;
+  image.removeAttribute("data-small-upload");
 }
 
 // Restore an image when onscreen

GitHub
sha: 695894d4

2 Likes