[extensions-web] review: Clean up code



commit 8ecf66d8a60117b6fac19ccbb1fd03563715deac
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon May 20 16:39:58 2013 -0400

    review: Clean up code
    
    We don't need a hash for two elements.

 sweettooth/static/js/review.js |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/sweettooth/static/js/review.js b/sweettooth/static/js/review.js
index 9ada48c..f0e0ff3 100644
--- a/sweettooth/static/js/review.js
+++ b/sweettooth/static/js/review.js
@@ -5,15 +5,12 @@ define(['jquery', 'diff'], function($, diff) {
 
     var REVIEW_URL_BASE = '/review/ajax';
 
-    var BINARY_TYPES = {};
-    $.each(['mo', 'compiled'], function() {
-        BINARY_TYPES[this] = true;
-    });
+    var BINARY_TYPES = ['mo', 'compiled'];
 
     function isBinary(filename) {
         var parts = filename.split('.');
         var ext = parts[parts.length - 1];
-        return BINARY_TYPES.hasOwnProperty(ext);
+        return BINARY_TYPES.indexOf(ext) >= 0;
     }
 
     function buildFileView(data) {


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