From aa2a01174fcb5b26184e00d11a33f1ce254ed44d Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 23 Aug 2018 12:37:44 +0200 Subject: [PATCH] lint compliance --- www/drive/inner.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index f7854995a..1a603cd53 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -3005,7 +3005,7 @@ define([ var pathsList = []; var type = $contextMenu.attr('data-menu-type'); - var el; + var el, data; if (paths.length === 0) { log(Messages.fm_forbidden); debug("Context menu on a forbidden or unexisting element. ", paths); @@ -3050,7 +3050,7 @@ define([ else if ($(this).hasClass('cp-app-drive-context-share')) { if (paths.length !== 1) { return; } el = manager.find(paths[0].path); - var data, parsed, modal; + var parsed, modal; if (manager.isSharedFolder(el)) { data = manager.getSharedFolderData(el); parsed = Hash.parsePadUrl(data.href); @@ -3065,11 +3065,10 @@ define([ data = manager.getFileData(el); parsed = Hash.parsePadUrl(data.href); var roParsed = Hash.parsePadUrl(data.roHref); - var type = parsed.type || roParsed.type; - console.log(parsed); + var padType = parsed.type || roParsed.type; var padData = { origin: APP.origin, - pathname: "/" + type + "/", + pathname: "/" + padType + "/", hashes: { editHash: parsed.hash, viewHash: roParsed.hash, @@ -3081,7 +3080,7 @@ define([ }, common: common }; - modal = type === 'file' ? UIElements.createFileShareModal(padData) + modal = padType === 'file' ? UIElements.createFileShareModal(padData) : UIElements.createShareModal(padData); modal = UI.dialog.tabs(modal); } @@ -3133,7 +3132,7 @@ define([ else if ($(this).hasClass("cp-app-drive-context-hashtag")) { if (paths.length !== 1) { return; } el = manager.find(paths[0].path); - var data = manager.getFileData(el); + data = manager.getFileData(el); if (!data) { return void console.error("Expected to find a file"); } var href = data.href || data.roHref; common.updateTags(href);