Permalink
Browse files

Fixes inconsistent usage of typeof operator

- The typeof operator looks like a function when used with optional parameters ()
- This is just an attempt to make it consistent across the code
  • Loading branch information...
1 parent 173c064 commit 62a896192ae322a587c050c98ebfb4d3eabf4fbb @iperdomo iperdomo committed Nov 12, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 source/ajax/xhr.js
  2. +2 −2 source/dom/dispatcher.js
View
@@ -40,7 +40,7 @@ enyo.xhr = {
}
}
//
- if(typeof(xhr.overrideMimeType) == "function" && inParams.mimeType) {
+ if((typeof xhr.overrideMimeType == "function") && inParams.mimeType) {
xhr.overrideMimeType(inParams.mimeType);
}
//
View
@@ -17,7 +17,7 @@ enyo.dispatcher = {
for (i=0; (n=d.windowEvents[i]); i++) {
// Chrome Packaged Apps don't like "unload"
if(n === "unload" &&
- typeof(window.chrome) === "object" &&
+ (typeof window.chrome === "object") &&
window.chrome.app) {
continue;
}
@@ -135,7 +135,7 @@ enyo.bubbler = "enyo.bubble(arguments[0])";
var args = Array.prototype.slice.call(arguments, 0),
control = args.shift();
- if(typeof(control) === "object" && typeof(control.hasNode) === "function") {
+ if((typeof control === "object") && (typeof control.hasNode === "function")) {
enyo.forEach(args, function(event) {
if(this.hasNode()) {
enyo.dispatcher.listen(this.node, event, bubbleUp);

0 comments on commit 62a8961

Please sign in to comment.