mirror of
https://github.com/xevidos/codiad.git
synced 2025-01-11 15:31:56 +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
|
// Context Menu
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
_this = codiad.editor
|
||||||
|
|
||||||
|
if( _this.getActive() ) {
|
||||||
|
|
||||||
let path = codiad.active.getPath();
|
let path = codiad.active.getPath();
|
||||||
$(e.target).attr('data-path', path);
|
$(e.target).attr('data-path', path);
|
||||||
codiad.filemanager.contextMenuShow( e, path, 'editor', 'editor');
|
codiad.filemanager.contextMenuShow( e, path, 'editor', 'editor');
|
||||||
$(this).addClass('context-menu-active');
|
$(this).addClass('context-menu-active');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).resize(function(){
|
$(window).resize(function(){
|
||||||
|
|
Loading…
Reference in a new issue