Skip to content

Commit

Permalink
Blindly attempt to fix #716
Browse files Browse the repository at this point in the history
This is becoming another snowball of hacks...
  • Loading branch information
Alhadis committed Mar 18, 2018
1 parent 9471231 commit eda542d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- **New icons:** Tipe (`.tipe`), Workbox (`workbox-config.js`)
- **Support:** App Store (`.app` folders), Archive (`.sit`), Atom (`.atomproject.{json, cson}`), Data (`fstab`, `magic.mgc`), Download (`.crdownload`), Dylibs (`.appex` and `.ideplugin` folders), Finder (`.DS_Store`, `._*`), Swagger (`swagger.yaml`, `swagger.yml`)

### Fixed
- [[`#716`][]]: Exception thrown from null filesystem reference

[`#716`]: https://github.com/file-icons/atom/issues/716


[v2.1.17] - 2018-02-23
Expand Down
6 changes: 3 additions & 3 deletions lib/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ class UI {
}),
this.onSaveNewFile(args => {
const file = FileSystem.get(args.file);
file.addEditor(args.editor);
file && file.addEditor(args.editor);
}),
this.onOpenFile(editor => {
const path = editor.getPath();
let entity = FileSystem.get(path);
if("function" !== typeof entity.addEditor){
if(!entity || "function" !== typeof entity.addEditor){
FileSystem.paths.delete(path);
entity = FileSystem.get(path);
}
entity.addEditor(editor);
entity && entity.addEditor(editor);
})
);
}
Expand Down

0 comments on commit eda542d

Please sign in to comment.