Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
setTreeData: function(dataOrPromise, opt) {
if (h5.async.isPromise(dataOrPromise)) {
var indicator = this.indicator().show();
dataOrPromise.done(this.own(function(treeData) {
this._setTreeData(treeData, opt);
indicator.hide();
}));
} else {
this._setTreeData(dataOrPromise, opt);
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment