From 0ef9b217ef17bfaa6b975b7fa99cf2c68ddd7ec7 Mon Sep 17 00:00:00 2001 From: Walter Chen Date: Wed, 23 Dec 2015 18:06:25 +0800 Subject: [PATCH] fixed a variable undefied issue in js --- webapi_tests/app_management.js | 1 + webapi_tests/certapp.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/webapi_tests/app_management.js b/webapi_tests/app_management.js index e38103ba..00bf362a 100644 --- a/webapi_tests/app_management.js +++ b/webapi_tests/app_management.js @@ -7,6 +7,7 @@ var GaiaApps = { normalizeName: function(name) { + if(name == null || name == "undefined") return ""; return name.replace(/[- ]+/g, '').toLowerCase(); }, diff --git a/webapi_tests/certapp.py b/webapi_tests/certapp.py index f797b297..0e56779e 100644 --- a/webapi_tests/certapp.py +++ b/webapi_tests/certapp.py @@ -72,7 +72,7 @@ def launch(marionette): # If the app is already launched this doesn't launch a new app, but # returns a reference to existing app. app = marionette.execute_async_script( - "GaiaApps.launchWithName('%s')" % name, script_timeout=timeout) + "GaiaApps.launchWithName('%s')" % name, script_timeout=timeout) if app is None: raise LaunchError("Unable to launch app: %s" % name) activate(marionette, app=app)