[sushi] js: fix some runtime warnings



commit a7265a0a451eaddf7a96a41b072bb58d6fa1a579
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Feb 15 17:40:51 2014 -0800

    js: fix some runtime warnings

 src/js/ui/mimeHandler.js |    4 ++--
 src/js/viewers/image.js  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/js/ui/mimeHandler.js b/src/js/ui/mimeHandler.js
index c6e583c..cac836c 100644
--- a/src/js/ui/mimeHandler.js
+++ b/src/js/ui/mimeHandler.js
@@ -56,7 +56,7 @@ MimeHandler.prototype = {
     },
 
     registerMimeTypes: function(mimeTypes, obj) {
-        for (idx in mimeTypes)
+        for (let idx in mimeTypes)
             this.registerMime(mimeTypes[idx], obj);
     },
 
@@ -68,7 +68,7 @@ MimeHandler.prototype = {
             /* if this fails, try to see if we have any handlers
              * registered for a parent type.
              */
-            for (key in this._mimeTypes) {
+            for (let key in this._mimeTypes) {
                 if (Gio.content_type_is_a (mime, key))
                     return this._mimeTypes[key];
             }
diff --git a/src/js/viewers/image.js b/src/js/viewers/image.js
index 2437993..9951065 100644
--- a/src/js/viewers/image.js
+++ b/src/js/viewers/image.js
@@ -117,7 +117,7 @@ let handler = new MimeHandler.MimeHandler();
 let renderer = new ImageRenderer();
 
 let formats = GdkPixbuf.Pixbuf.get_formats();
-for (idx in formats) {
+for (let idx in formats) {
     let mimeTypes = formats[idx].get_mime_types();
     handler.registerMimeTypes(mimeTypes, renderer);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]