Permalink
Browse files

Merge pull request #774 from chaoszcat/patch-2

[Android] Use of options==="undefined" is incorrect.
  • Loading branch information...
2 parents 18e32c8 + 8894965 commit cc9f01cb4ae4abbe829009773293bbc1227f6795 @macdonst macdonst committed Sep 4, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 Android/ChildBrowser/1.8.1/www/childbrowser.js
@@ -23,10 +23,9 @@ ChildBrowser.LOCATION_CHANGED_EVENT = 1;
* @param options An object that specifies additional options
*/
ChildBrowser.prototype.showWebPage = function(url, options) {
- if (options === null || options === "undefined") {
- var options = new Object();
- options.showLocationBar = true;
- }
+ options = options || {
+ showLocationBar: true
+ };
cordova.exec(this._onEvent, this._onError, "ChildBrowser", "showWebPage", [url, options]);
};

0 comments on commit cc9f01c

Please sign in to comment.