Commit de40b201 authored by Romain Casati's avatar Romain Casati
Browse files

Fix for loading .sql/.sqlit/.db files.

parent 04976777
......@@ -116,9 +116,12 @@
};
putModule (filename, content) {
const ext = filename.split('/').pop();
content = new Uint8Array(content);
const ext = filename.split('.').pop();
switch( ext ) {
case 'sql':
let decoder = new TextDecoder("utf-8");
content = decoder.decode(content);
this.db.run(content);
break;
case 'sqlite':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment