mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-22 19:53:49 +01:00
Fix bug of missing error encode.
This commit is contained in:
parent
ab4eddf1c2
commit
5821a776df
@ -58,7 +58,10 @@ class MDExporter implements Exporter {
|
||||
}
|
||||
result += '\n';
|
||||
|
||||
return Promise.resolve(result);
|
||||
// Encode as url response ...
|
||||
const blob = new Blob([result], { type: 'text/markdown' });
|
||||
const urlStr = URL.createObjectURL(blob);
|
||||
return Promise.resolve(urlStr);
|
||||
}
|
||||
|
||||
private traverseBranch(prefix: string, branches: Array<INodeModel>) {
|
||||
|
@ -35,8 +35,12 @@ class TxtExporter implements Exporter {
|
||||
const { mindmap } = this;
|
||||
|
||||
const branches = mindmap.getBranches();
|
||||
const retult = this.traverseBranch('', branches);
|
||||
return Promise.resolve(retult);
|
||||
const txtStr = this.traverseBranch('', branches);
|
||||
|
||||
// Encode as url response ...
|
||||
const blob = new Blob([txtStr], { type: 'text/pain' });
|
||||
const result = URL.createObjectURL(blob);
|
||||
return Promise.resolve(result);
|
||||
}
|
||||
|
||||
private traverseBranch(prefix: string, branches: INodeModel[]) {
|
||||
|
Loading…
Reference in New Issue
Block a user