Skip to content

Commit 835217d

Browse files
committed
fix bug
1 parent 449cb6c commit 835217d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

js/fileHandler.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ export const fileTypes = {
3030
export default class FileHandler {
3131
constructor(treeSelector) {
3232
this.data = null;
33-
this.name = null;
33+
this.name = '';
3434
this.treeSelector = treeSelector;
3535
}
3636

37-
loadFile(file) {
37+
async loadFile(file) {
3838
return new Promise(resolve => {
3939
let reader = new FileReader();
4040
reader.onloadend = async b => {
@@ -97,7 +97,6 @@ export default class FileHandler {
9797
}
9898

9999
getType() {
100-
const reader = new BinaryReader(this.data);
101100
// [Unity]
102101
// Bundle: "Unity" -- matches all bundle types ("FS", "Web", etc)
103102
if (this._checkMagicBasic(5, [0x55, 0x6e, 0x69, 0x74, 0x79])) return fileTypes.UnityBundle;

0 commit comments

Comments
 (0)