Skip to content

Commit

Permalink
style(manifestWriter): fixed yoda conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-bansil committed Aug 10, 2016
1 parent a9bd938 commit 1b3d28c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hooks/lib/android/manifestWriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Class injects plugin preferences into AndroidManifest.xml file.

var action = actions[0]['$']['android:name'];

return ('android.intent.action.VIEW' === action);
return action === 'android.intent.action.VIEW';
}

/**
Expand All @@ -126,11 +126,11 @@ Class injects plugin preferences into AndroidManifest.xml file.
categories.forEach(function(category) {
var categoryName = category['$']['android:name'];
if (!isBrowsable) {
isBrowsable = 'android.intent.category.BROWSABLE' === categoryName;
isBrowsable = categoryName === 'android.intent.category.BROWSABLE';
}

if (!isDefault) {
isDefault = 'android.intent.category.DEFAULT' === categoryName;
isDefault = categoryName === 'android.intent.category.DEFAULT';
}
});

Expand Down Expand Up @@ -237,8 +237,8 @@ Class injects plugin preferences into AndroidManifest.xml file.
return false;
}

var isMainAction = ('android.intent.action.MAIN' === action[0]['$']['android:name']),
isLauncherCategory = ('android.intent.category.LAUNCHER' === category[0]['$']['android:name']);
var isMainAction = (action[0]['$']['android:name'] === 'android.intent.action.MAIN'),
isLauncherCategory = (category[0]['$']['android:name'] === 'android.intent.category.LAUNCHER');

return isMainAction && isLauncherCategory;
});
Expand Down

0 comments on commit 1b3d28c

Please sign in to comment.