...
 
Commits (2)
......@@ -19,7 +19,6 @@ job_lint:
except:
- master
script:
- npm config get registry
- echo "$(date) Changing to directory ${CI_PROJECT_DIR}"
- cd $CI_PROJECT_DIR
- echo "$(date) Cleaning up /dist directory"
......
......@@ -189,9 +189,12 @@ export class DefaultModel {
if (this.isItemsModel
&& ( !this.mItemsStore
|| !this.mItemsStore.hasOwnProperty('data')
|| !this.mItemsStore.data
|| !this.mItemsStore.data.hasOwnProperty('items')
|| !this.mItemsStore.data.items
|| typeof this.mItemsStore.data.items === 'undefined')
|| typeof this.mItemsStore.data.items === 'undefined'
)
) {
return false;
}
......@@ -304,16 +307,16 @@ export class DefaultModel {
* this actually configures the data class used to store
* the field values in it.
*
* @param class fields
* @param class dataType
*/
set modelDataType(data: any) {
if (!data) {
set modelDataType(dataType: any) {
if (!dataType) {
return;
}
if (this.isFieldsModel) {
this.mDataType = new data;
this.mFields = new data;
this.mDataType = new dataType;
this.mFields = new dataType;
if (!this.mFields.hasOwnProperty('guid')) {
throw new Error('Fields model class used to have a guid-property!');
......@@ -323,12 +326,12 @@ export class DefaultModel {
return;
}
this.mInitFields = new data;
this.mInitFields = new dataType;
this.isInitialized = true;
return;
}
this.mItemsStore.data = data;
this.mItemsStore.data = dataType;
if (!this.mItemsStore.data.hasOwnProperty('items')) {
throw new Error('Items model class used to have an items-property!');
......@@ -631,7 +634,7 @@ export class DefaultModel {
* @return boolean
*/
get isFieldsModel(): boolean {
return (this.mType !== 'fields');
return (this.mType === 'fields');
}
/**
......@@ -640,7 +643,7 @@ export class DefaultModel {
* @return boolean
*/
get isItemsModel(): boolean {
return (this.mType !== 'items');
return (this.mType === 'items');
}
/**
......