mirror of
https://github.com/xevidos/codiad.git
synced 2025-01-11 07:21:57 +01:00
Fixed error coming up when editor context menu was triggered while no files were open.
This commit is contained in:
parent
2e1d7ea559
commit
4c26d4b10a
1 changed files with 9 additions and 4 deletions
|
@ -293,10 +293,15 @@
|
|||
|
||||
// Context Menu
|
||||
e.preventDefault();
|
||||
let path = codiad.active.getPath();
|
||||
$(e.target).attr('data-path', path);
|
||||
codiad.filemanager.contextMenuShow( e, path, 'editor', 'editor');
|
||||
$(this).addClass('context-menu-active');
|
||||
_this = codiad.editor
|
||||
|
||||
if( _this.getActive() ) {
|
||||
|
||||
let path = codiad.active.getPath();
|
||||
$(e.target).attr('data-path', path);
|
||||
codiad.filemanager.contextMenuShow( e, path, 'editor', 'editor');
|
||||
$(this).addClass('context-menu-active');
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function(){
|
||||
|
|
Loading…
Reference in a new issue