]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#257] cleanup of if/else - number check
authorScottDowne <sdowne@learn.senecac.on.ca>
Tue, 11 Jan 2011 23:24:20 +0000 (18:24 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Tue, 11 Jan 2011 23:24:20 +0000 (18:24 -0500)
plugins/googlemap/popcorn.googlemap.js

index 80581d8e5699226011a92d9d89be1b848b02bf45..4e13bbb59dd522a2288e6da20c6c9e3cf232e6c4 100644 (file)
@@ -128,11 +128,10 @@ var googleCallback;
             options._map.setCenter(options._location);
 
             // make sure options.zoom is a number
-            if ( options.zoom && isNaN( options.zoom ) ) {
+            if ( options.zoom && typeof options.zoom !== "number" ) {
               options.zoom = +options.zoom;
             }
             options.zoom = options.zoom || 0; // default to 0
-
             options._map.setZoom( options.zoom );
           }
         };