From f31aae9fa22b9f80df8a49cf261e4af8052a0c0e Mon Sep 17 00:00:00 2001 From: Taka Date: Mon, 16 Jul 2018 09:49:02 +0000 Subject: [PATCH] Fixed a problem when uploading an individual template file. --- vasl_templates/webapp/static/generate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vasl_templates/webapp/static/generate.js b/vasl_templates/webapp/static/generate.js index 882a8e4..01bca26 100644 --- a/vasl_templates/webapp/static/generate.js +++ b/vasl_templates/webapp/static/generate.js @@ -448,6 +448,8 @@ function do_load_template_pack( fname, data ) } else { // nope - assume an individual template file + if ( data instanceof ArrayBuffer ) + data = String.fromCharCode.apply( null, new Uint8Array(data) ) ; on_new_template( fname, data ) ; install_new_templates( "The template file was loaded." ) ; }