Commit c0287e69 authored by Clement Ho's avatar Clement Ho

Fix indentation

parent 4ec8eb9a
...@@ -45,22 +45,23 @@ require('../window')(function(w){ ...@@ -45,22 +45,23 @@ require('../window')(function(w){
dynamicList.outerHTML = loadingTemplate.outerHTML; dynamicList.outerHTML = loadingTemplate.outerHTML;
} }
this._loadUrlData(config.endpoint).then(function(d) { this._loadUrlData(config.endpoint)
if (config.loadingTemplate) { .then(function(d) {
var dataLoadingTemplate = hook.list.list.querySelector('[data-loading-template]'); if (config.loadingTemplate) {
var dataLoadingTemplate = hook.list.list.querySelector('[data-loading-template]');
if (dataLoadingTemplate) { if (dataLoadingTemplate) {
dataLoadingTemplate.outerHTML = self.listTemplate; dataLoadingTemplate.outerHTML = self.listTemplate;
}
} }
} hook.list[config.method].call(hook.list, d);
hook.list[config.method].call(hook.list, d); }).catch(function(e) {
}).catch(function(e) { if(e.message) {
if(e.message) { console.error(e.message, e.stack); // eslint-disable-line no-console
console.error(e.message, e.stack); // eslint-disable-line no-console } else {
} else { console.error(e); // eslint-disable-line no-console
console.error(e); // eslint-disable-line no-console }
} });
});
}, },
destroy: function() { 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