summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/droplab/droplab_ajax.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/droplab/droplab_ajax.js b/app/assets/javascripts/droplab/droplab_ajax.js
index 629260006f3..ebb518eeef4 100644
--- a/app/assets/javascripts/droplab/droplab_ajax.js
+++ b/app/assets/javascripts/droplab/droplab_ajax.js
@@ -47,7 +47,11 @@ require('../window')(function(w){
this._loadUrlData(config.endpoint).then(function(d) {
if (config.loadingTemplate) {
- hook.list.list.querySelector('[data-loading-template]').outerHTML = self.listTemplate;
+ var dataLoadingTemplate = hook.list.list.querySelector('[data-loading-template]');
+
+ if (dataLoadingTemplate) {
+ dataLoadingTemplate.outerHTML = self.listTemplate;
+ }
}
hook.list[config.method].call(hook.list, d);
}).catch(function(e) {