mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 17:04:16 +00:00
fix(dom) getPanel: when no currentFile panel is undefined
This commit is contained in:
parent
ef0fb11a23
commit
161a363b04
1 changed files with 8 additions and 2 deletions
|
|
@ -1238,11 +1238,17 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* @param options = {active: true}
|
||||
*/
|
||||
this.getPanel = function(options) {
|
||||
var dataName = 'js-',
|
||||
current = this.getCurrentFile(),
|
||||
var files, panel, isLeft,
|
||||
dataName = 'js-',
|
||||
current = this.getCurrentFile();
|
||||
|
||||
if (!current) {
|
||||
panel = this.getByDataName('left');
|
||||
} else {
|
||||
files = current.parentElement,
|
||||
panel = files.parentElement,
|
||||
isLeft = panel.getAttribute('data-name') === 'js-left';
|
||||
}
|
||||
|
||||
/* if {active : false} getting passive panel */
|
||||
if (options && !options.active) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue