From 4680db99615757df9d9cc561c9a9fc5b9b1c108a Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Mon, 23 May 2022 13:12:30 +0200 Subject: Adapt to new application framework Drop usage of agl-js-api, and just provide a mock for lowcan calls. Bug-AGL: SPEC_4248 Signed-off-by: Jose Dapena Paz Change-Id: I308441f8545ca67e4ae65b8097cb4623648c9034 --- src/js/templates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/js/templates.js') 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 { -- cgit 1.2.3-korg