diff options
Diffstat (limited to 'src/js/templates.js')
-rw-r--r-- | src/js/templates.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/templates.js b/src/js/templates.js index 2513722..4b71638 100644 --- a/src/js/templates.js +++ b/src/js/templates.js @@ -2,12 +2,12 @@ export function load(template) { return new Promise(function(resolve, reject){ var xhr = new XMLHttpRequest(); - xhr.open('GET', '/templates/'+template); + xhr.open('GET', './templates/'+template); xhr.send(); xhr.onload = function() { - if (xhr.status != 200) { + if (xhr.status != 200 && xhr.status != 0) { console.error('Error loading template', xhr.status, xhr.statusText); reject(xhr.status); } else { |