aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/Scenario.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenario/Scenario.js')
-rw-r--r--src/scenario/Scenario.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/scenario/Scenario.js b/src/scenario/Scenario.js
index ba206632..842c9dd3 100644
--- a/src/scenario/Scenario.js
+++ b/src/scenario/Scenario.js
@@ -4,10 +4,10 @@
*/
// Public namespace
-angular.scenario = {};
+angular.scenario = angular.scenario || {};
// Namespace for the UI
-angular.scenario.ui = {};
+angular.scenario.ui = angular.scenario.ui || {};
/**
* Defines a new DSL statement. If your factory function returns a Future
@@ -104,7 +104,8 @@ function asyncForEach(list, iterator, done) {
function browserTrigger(element, type) {
- if (!element.nodeName) element = element[0];
+ if (element && !element.nodeName) element = element[0];
+ if (!element) return;
if (!type) {
type = {
'text': 'change',