isSystem is a string because reasons (#817)

This commit is contained in:
Vincent Fiduccia 2016-08-12 17:05:57 -07:00 committed by GitHub
parent 2acd1675f7
commit bda751bae3
2 changed files with 8 additions and 3 deletions

View File

@ -183,10 +183,15 @@ export default Ember.Component.extend(NewOrEdit, {
} }
let explicit = this.get('templateResource.isSystem'); let explicit = this.get('templateResource.isSystem');
if ( explicit === true || explicit === false ) { if ( explicit === true || explicit === "true" ) {
return explicit; return true;
} }
if ( explicit === false || explicit === "false" ) {
return false;
}
// Things in one of the system categories go in system.
let systemCategories = C.EXTERNAL_ID.SYSTEM_CATEGORIES.map((str) => { return str.trim().toLowerCase(); }); let systemCategories = C.EXTERNAL_ID.SYSTEM_CATEGORIES.map((str) => { return str.trim().toLowerCase(); });
let category = (this.get('templateResource.category')||'').trim().toLowerCase(); let category = (this.get('templateResource.category')||'').trim().toLowerCase();
return systemCategories.indexOf(category) >= 0; return systemCategories.indexOf(category) >= 0;

View File

@ -1,6 +1,6 @@
{ {
"name": "ui", "name": "ui",
"version": "1.2.6", "version": "1.2.7",
"private": true, "private": true,
"directories": { "directories": {
"doc": "doc", "doc": "doc",