You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2013/07/25 01:07:24 UTC
[04/23] git commit: Fix for check_requirements function wrapper
around errors.
Fix for check_requirements function wrapper around errors.
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/1fb3d50f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/1fb3d50f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/1fb3d50f
Branch: refs/heads/plugman-registry
Commit: 1fb3d50f34413ebf912902e91f8439f434af6910
Parents: 2782d5e
Author: Fil Maj <ma...@gmail.com>
Authored: Tue Jul 16 12:01:15 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Tue Jul 16 12:01:15 2013 -0700
----------------------------------------------------------------------
src/platform.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1fb3d50f/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index a49cc12..13ff883 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -182,7 +182,7 @@ module.exports.supports = function(project_root, name, callback) {
// check for platform support
platformParser.check_requirements(project_root, function(e) {
// typecast String to Error
- e = (e instanceof String) ? new Error(e) : e;
+ e = (typeof e == 'string') ? new Error(e) : e;
// typecast false Boolean to null
e = (e) ? e : null;