aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/templates.js
diff options
context:
space:
mode:
authorJose Dapena Paz <jdapena@igalia.com>2022-05-23 13:12:30 +0200
committerJose Dapena Paz <jdapena@igalia.com>2022-05-23 13:27:12 +0200
commit4680db99615757df9d9cc561c9a9fc5b9b1c108a (patch)
treecd7ee1c244737876f2bc87e0c4e92a1b9f60164f /src/js/templates.js
parent15605b29a0978b02c5a6d046757b48d947fe4327 (diff)
Adapt to new application frameworkneedlefish_13.93.0needlefish/13.93.013.93.0
Drop usage of agl-js-api, and just provide a mock for lowcan calls. Bug-AGL: SPEC_4248 Signed-off-by: Jose Dapena Paz <jdapena@igalia.com> Change-Id: I308441f8545ca67e4ae65b8097cb4623648c9034
Diffstat (limited to 'src/js/templates.js')
-rw-r--r--src/js/templates.js4
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 {