Commit c0287e69 authored by Clement Ho's avatar Clement Ho

Fix indentation

parent 4ec8eb9a
......@@ -45,22 +45,23 @@ require('../window')(function(w){
dynamicList.outerHTML = loadingTemplate.outerHTML;
}
this._loadUrlData(config.endpoint).then(function(d) {
if (config.loadingTemplate) {
var dataLoadingTemplate = hook.list.list.querySelector('[data-loading-template]');
this._loadUrlData(config.endpoint)
.then(function(d) {
if (config.loadingTemplate) {
var dataLoadingTemplate = hook.list.list.querySelector('[data-loading-template]');
if (dataLoadingTemplate) {
dataLoadingTemplate.outerHTML = self.listTemplate;
if (dataLoadingTemplate) {
dataLoadingTemplate.outerHTML = self.listTemplate;
}
}
}
hook.list[config.method].call(hook.list, d);
}).catch(function(e) {
if(e.message) {
console.error(e.message, e.stack); // eslint-disable-line no-console
} else {
console.error(e); // eslint-disable-line no-console
}
});
hook.list[config.method].call(hook.list, d);
}).catch(function(e) {
if(e.message) {
console.error(e.message, e.stack); // eslint-disable-line no-console
} else {
console.error(e); // eslint-disable-line no-console
}
});
},
destroy: function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment