fix javascript fail if xosvalidators.js not loaded by html
diff --git a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js
index b0ee0dc..0651709 100644
--- a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -361,11 +361,11 @@
}
}
- if (xosdefaults && xosdefaults[modelName]) {
+ if ((typeof xosdefaults !== "undefined") && xosdefaults[modelName]) {
modelAttrs["defaults"] = xosdefaults[modelName];
}
- if (xosvalidators && xosvalidators[modelName]) {
+ if ((typeof xosvalidators !== "undefined") && xosvalidators[modelName]) {
modelAttrs["validators"] = xosvalidators[modelName];
}