Skip to content

Commit

Permalink
fixed bug: multiple subView was not loading , now corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
Narendra Sisodiya committed Jan 4, 2015
1 parent 24fb39f commit abdad15
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "choona.js",
"repo": "nsisodiya/choona.js",
"version": "1.3.7",
"version": "1.3.8",
"main": "dist/choona.js",
"keywords": [
"scalable",
Expand Down
6 changes: 6 additions & 0 deletions dist/choona.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@
throw new Error("loadSubView : module cannot be undefined");
}
}
if (data.id === undefined) {
data.id = choona.uniqueIdManager.getId();
var d = document.createElement("div");
d.setAttribute("id", data.id);
this.$.appendChild(d);
}

if (this._viewMetadata.subModuleList[data.id] === undefined) {
this._viewMetadata.subModuleList[data.id] = new data.module(data, {
Expand Down
2 changes: 1 addition & 1 deletion dist/choona.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/choona.View.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@
throw new Error("loadSubView : module cannot be undefined");
}
}
if (data.id === undefined) {
data.id = choona.uniqueIdManager.getId();
var d = document.createElement("div");
d.setAttribute("id", data.id);
this.$.appendChild(d);
}

if (this._viewMetadata.subModuleList[data.id] === undefined) {
this._viewMetadata.subModuleList[data.id] = new data.module(data, {
Expand Down

0 comments on commit abdad15

Please sign in to comment.