watcher bug fixed
This commit is contained in:
parent
deddbccae4
commit
37af88ee19
|
@ -1,7 +1,7 @@
|
||||||
import {module} from '../module';
|
import {module} from '../module';
|
||||||
|
|
||||||
const isFullEmpty = item => {
|
const isFullEmpty = item => {
|
||||||
return (!item && item !== 0 && item !== false) || (typeof item === 'object' && !Object.keys(item).length);
|
return (item === null || item === undefined) || (typeof item === 'object' && !Object.keys(item).length);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default isFullEmpty;
|
export default isFullEmpty;
|
||||||
|
|
|
@ -96,7 +96,7 @@ export default class Watcher extends Component {
|
||||||
let changedData = getModifiedData(this.data, this.orgData);
|
let changedData = getModifiedData(this.data, this.orgData);
|
||||||
|
|
||||||
if (this.save) {
|
if (this.save) {
|
||||||
this.save.model = this.copyInNewObject(changedData);
|
this.save.model = changedData; // this.copyInNewObject(changedData);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.save.accept().then(
|
this.save.accept().then(
|
||||||
json => this.writeData({data: json}, resolve),
|
json => this.writeData({data: json}, resolve),
|
||||||
|
|
Loading…
Reference in New Issue