summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoren Lev <korenlev@gmail.com>2017-08-10 19:52:10 +0300
committerKoren Lev <korenlev@gmail.com>2017-08-10 19:52:10 +0300
commit4c141b67a81281ec483885bd65f25ea0e91f000d (patch)
treea9de0ed74b87d6bfb435e00c97818f5a4ec31319
parent0823cb0d66cb53ecddef2152deb3162f54fe84f2 (diff)
fixes to clique_types creations
Change-Id: I05cf735bdb50bc5b0daa3f88cce0a017a96a7239 Signed-off-by: Koren Lev <korenlev@gmail.com>
-rw-r--r--ui/imports/api/clique-types/clique-types.js1
-rw-r--r--ui/imports/ui/components/clique-type/clique-type.html2
-rw-r--r--ui/imports/ui/components/clique-type/clique-type.js4
3 files changed, 6 insertions, 1 deletions
diff --git a/ui/imports/api/clique-types/clique-types.js b/ui/imports/api/clique-types/clique-types.js
index 852c319..e464b8f 100644
--- a/ui/imports/api/clique-types/clique-types.js
+++ b/ui/imports/api/clique-types/clique-types.js
@@ -46,6 +46,7 @@ let schema = {
link_types: {
type: [String],
minCount: 1,
+ defaultValue: [],
custom: function () {
let that = this;
let findResult = R.all(function (pLinkType) {
diff --git a/ui/imports/ui/components/clique-type/clique-type.html b/ui/imports/ui/components/clique-type/clique-type.html
index 318fb38..7130383 100644
--- a/ui/imports/ui/components/clique-type/clique-type.html
+++ b/ui/imports/ui/components/clique-type/clique-type.html
@@ -61,7 +61,7 @@
<div class="sm-field-group-link-types cl-field-group">
<label class="cl-field-label">Link Types</label>
- {{#if (getModelField 'link_types') }}
+ {{#if (exists (getModelField 'link_types')) }}
{{>SelectableOrderedInput (argsLinkTypesInput linkTypesList (getModelField 'link_types')) }}
{{/if }}
<div class="cl-field-desc">Link Types</div>
diff --git a/ui/imports/ui/components/clique-type/clique-type.js b/ui/imports/ui/components/clique-type/clique-type.js
index 31efc88..ae50b94 100644
--- a/ui/imports/ui/components/clique-type/clique-type.js
+++ b/ui/imports/ui/components/clique-type/clique-type.js
@@ -213,6 +213,10 @@ Template.CliqueType.helpers({
},
};
},
+
+ exists: function (val) {
+ return ! R.isNil(val);
+ }
}); // end: helpers
function initInsertView(instance, query) {