fix body container problem

This commit is contained in:
kmdjs 2016-05-23 16:05:25 +08:00
parent e20e95afee
commit 0db7a56829
3 changed files with 3 additions and 3 deletions

2
dist/nuclear.js vendored
View File

@ -1438,7 +1438,7 @@ Nuclear._mixObj = function (obj) {
if(!this._nuclearReRender) {
if (!this._nuclearParentEmpty) {
this.parentNode = typeof selector === "string" ? document.querySelector(selector) : selector;
if(document.body!==this.parentNode) {
if(document.body === this.parentNode) {
this.parentNode=document.createElement('div')
document.body.appendChild(this.parentNode);
}

2
dist/nuclear.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -61,7 +61,7 @@ Nuclear._mixObj = function (obj) {
if(!this._nuclearReRender) {
if (!this._nuclearParentEmpty) {
this.parentNode = typeof selector === "string" ? document.querySelector(selector) : selector;
if(document.body!==this.parentNode) {
if(document.body === this.parentNode) {
this.parentNode=document.createElement('div')
document.body.appendChild(this.parentNode);
}