From 3f0bc79e0ab19f9ab26fdad22cd9e2f4dcb3d8cd Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 30 Dec 2014 02:50:26 -0800 Subject: [PATCH] Minor JavaScript fix Summary: Currently, `editdata` is implicitly defined as a global variable (and JSHint complains about this). Instead, change it to be a local variable. Test Plan: `arc lint` showed one less warning. Reviewers: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11062 --- resources/celerity/map.php | 16 ++++++++-------- webroot/rsrc/js/core/behavior-line-linker.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 51f0ca94f9..8a7d0efc4f 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -463,7 +463,7 @@ return array( 'rsrc/js/core/behavior-keyboard-shortcuts.js' => 'd75709e6', 'rsrc/js/core/behavior-konami.js' => '5bc2cb21', 'rsrc/js/core/behavior-lightbox-attachments.js' => 'f8ba29d7', - 'rsrc/js/core/behavior-line-linker.js' => 'f726d506', + 'rsrc/js/core/behavior-line-linker.js' => '1499a8cb', 'rsrc/js/core/behavior-more.js' => 'a80d0378', 'rsrc/js/core/behavior-object-selector.js' => '49b73b36', 'rsrc/js/core/behavior-oncopy.js' => '2926fff2', @@ -608,7 +608,7 @@ return array( 'javelin-behavior-phabricator-hovercards' => 'f36e01af', 'javelin-behavior-phabricator-keyboard-pager' => 'a8da01f0', 'javelin-behavior-phabricator-keyboard-shortcuts' => 'd75709e6', - 'javelin-behavior-phabricator-line-linker' => 'f726d506', + 'javelin-behavior-phabricator-line-linker' => '1499a8cb', 'javelin-behavior-phabricator-nav' => '14d7a8b8', 'javelin-behavior-phabricator-notification-example' => '7a9677fc', 'javelin-behavior-phabricator-object-selector' => '49b73b36', @@ -912,6 +912,12 @@ return array( 'javelin-uri', 'phabricator-textareautils', ), + '1499a8cb' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-history', + ), '14a827de' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1870,12 +1876,6 @@ return array( 'javelin-behavior-device', 'phabricator-title', ), - 'f726d506' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-history', - ), 'f7379f45' => array( 'javelin-behavior', 'javelin-dom', diff --git a/webroot/rsrc/js/core/behavior-line-linker.js b/webroot/rsrc/js/core/behavior-line-linker.js index 7e50e5c38c..0a651d6ca0 100644 --- a/webroot/rsrc/js/core/behavior-line-linker.js +++ b/webroot/rsrc/js/core/behavior-line-linker.js @@ -87,7 +87,7 @@ JX.behavior('phabricator-line-linker', function() { e.kill(); JX.History.replace(uri); if (editor_link.href) { - editdata = JX.Stratcom.getData(editor_link); + var editdata = JX.Stratcom.getData(editor_link); editor_link.href = editdata.link_template.replace('%25l', o); } });