Skip to content

Commit

Permalink
side-view crash workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiff committed Aug 27, 2018
1 parent ee55dd8 commit b1931bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/file-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng6-file-man",
"version": "1.0.2",
"version": "1.0.3",
"description": "Angular 6 File Manager component",
"keywords": [
"Angular 6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ export class FileManagerComponent implements OnInit {
this.sideMenuClosed = true;
}
else {
// todo fix this (kvoli tomu ze sa klika na ten isty node tak store ho ignoruje)
if (this.selectedNode === node && this.sideMenuClosed)
this.sideMenuClosed = false;
else if (this.selectedNode === node && !this.sideMenuClosed)
Expand All @@ -173,6 +172,11 @@ export class FileManagerComponent implements OnInit {

this.selectedNode = node;

// todo investigate this workaround - warning: [File Manager] failed to find requested node for path: [path]
if(!document.getElementById('side-view')) {
return;
}

if (this.sideMenuClosed) {
document.getElementById('side-view').classList.remove('selected');
} else {
Expand Down

0 comments on commit b1931bf

Please sign in to comment.