Fix issues of no file extension for pad export

This commit is contained in:
ClemDee
2019-07-29 16:30:48 +02:00
parent 3de9021397
commit 3e918ec1cf
13 changed files with 30 additions and 25 deletions

View File

@@ -39,7 +39,8 @@ define([
};
module.getContentExtension = function (mode) {
return (Modes.extensionOf(mode) || '.txt').slice(1);
var ext = Modes.extensionOf(mode);
return ext !== undefined ? ext : '.txt';
};
module.fileExporter = function (content) {
return new Blob([ content ], { type: 'text/plain;charset=utf-8' });