Skip to content
This repository was archived by the owner on Dec 9, 2021. It is now read-only.

Commit 6ec3062

Browse files
author
rsavian
committed
0.15.3
1 parent c97b144 commit 6ec3062

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

Gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ gulp.task('test', () => {
7373
});
7474

7575
gulp.task('default', ['clean', 'ts']);
76-
gulp.task('release', ['default', 'docs']);
76+
gulp.task('release', ['default']);

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ _onClickHandler(event) {
252252

253253
## Release History
254254

255+
* 2017-02-08 v0.15.3 BaseModel - Wasn't really fixed. Now it is fixed. Fingers crossed!
256+
255257
* 2017-02-08 v0.15.2 BaseModel - Fixed issue with arrays having the same data for every item in the array when instantiated directly on the property. Fixed issue with child models not actually being cloned into new objects when .clone() is called on the parent model.
256258

257259
* 2017-01-19 v0.15.1 Add missing Interface *.d.ts files.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "structurejs",
3-
"version": "0.15.2",
3+
"version": "0.15.3",
44
"dependencies": {
55
"jquery": "*",
66
"handlebars": "*"

js/model/BaseModel.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,14 @@ var __extends = (this && this.__extends) || function (d, b) {
177177
// Instantiate it and pass in the updateData to the constructor.
178178
returnData = new propertyData(updateData, this.sjsOptions);
179179
}
180+
else if ((updateData instanceof BaseModel) === true) {
181+
returnData = updateData.clone();
182+
}
180183
else if ((propertyData instanceof BaseModel) === true) {
181184
// If propertyData is an instance of a BaseModel class and has already been created.
182185
// Call the update method and pass in the updateData.
183-
returnData = propertyData.update(updateData);
184-
}
185-
else if ((updateData instanceof BaseModel) === true) {
186-
returnData = updateData.clone();
186+
propertyData.update(updateData);
187+
returnData = propertyData;
187188
}
188189
else {
189190
// Else just return the updateData to the property.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "structure-js",
3-
"version": "0.15.2",
3+
"version": "0.15.3",
44
"description": "A class based utility library for building modular and scalable web platform applications. Features opt-in classes and utilities which provide a solid foundation and toolset to build your next project.",
55
"url": "https://github.com/codeBelt/StructureJS",
66
"repository": "https://github.com/codeBelt/StructureJS",

ts/model/BaseModel.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,16 @@ class BaseModel extends BaseObject implements IBaseModel
194194
// Instantiate it and pass in the updateData to the constructor.
195195
returnData = new propertyData(updateData, this.sjsOptions);
196196
}
197+
else if ((updateData instanceof BaseModel) === true)
198+
{
199+
returnData = updateData.clone();
200+
}
197201
else if ((propertyData instanceof BaseModel) === true)
198202
{
199203
// If propertyData is an instance of a BaseModel class and has already been created.
200204
// Call the update method and pass in the updateData.
201-
returnData = propertyData.update(updateData);
202-
}
203-
else if ((updateData instanceof BaseModel) === true)
204-
{
205-
returnData = updateData.clone();
205+
propertyData.update(updateData);
206+
returnData = propertyData;
206207
}
207208
else
208209
{

0 commit comments

Comments
 (0)