From 851794e895e4fc3788beb476cd9962bc5571e11c Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 30 May 2014 10:07:33 -0700 Subject: [PATCH] Fix a JS issue in Paste Summary: Fixes T5227. --- resources/celerity/map.php | 18 +++++++++--------- webroot/rsrc/js/core/behavior-line-linker.js | 8 +++++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index d1da88183c..acc2fde13a 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -460,7 +460,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' => '3aa45ad9', - 'rsrc/js/core/behavior-line-linker.js' => '0969ff43', + 'rsrc/js/core/behavior-line-linker.js' => 'f726d506', 'rsrc/js/core/behavior-more.js' => '9b9197be', 'rsrc/js/core/behavior-object-selector.js' => 'e6f67523', 'rsrc/js/core/behavior-oncopy.js' => 'c3e218fe', @@ -601,7 +601,7 @@ return array( 'javelin-behavior-phabricator-hovercards' => '9c808199', 'javelin-behavior-phabricator-keyboard-pager' => 'b657bdf8', 'javelin-behavior-phabricator-keyboard-shortcuts' => 'd75709e6', - 'javelin-behavior-phabricator-line-linker' => '0969ff43', + 'javelin-behavior-phabricator-line-linker' => 'f726d506', 'javelin-behavior-phabricator-nav' => 'b5842a5e', 'javelin-behavior-phabricator-notification-example' => 'c51a6616', 'javelin-behavior-phabricator-object-selector' => 'e6f67523', @@ -864,13 +864,6 @@ return array( array( 0 => 'javelin-install', ), - '0969ff43' => - array( - 0 => 'javelin-behavior', - 1 => 'javelin-stratcom', - 2 => 'javelin-dom', - 3 => 'javelin-history', - ), '09b15cf1' => array( 0 => 'javelin-stratcom', @@ -1994,6 +1987,13 @@ return array( 2 => 'javelin-util', 3 => 'javelin-reactor', ), + 'f726d506' => + array( + 0 => 'javelin-behavior', + 1 => 'javelin-stratcom', + 2 => 'javelin-dom', + 3 => 'javelin-history', + ), 'f7379f45' => array( 0 => 'javelin-behavior', diff --git a/webroot/rsrc/js/core/behavior-line-linker.js b/webroot/rsrc/js/core/behavior-line-linker.js index 2a564b7125..7e50e5c38c 100644 --- a/webroot/rsrc/js/core/behavior-line-linker.js +++ b/webroot/rsrc/js/core/behavior-line-linker.js @@ -10,7 +10,13 @@ JX.behavior('phabricator-line-linker', function() { var origin = null; var target = null; var root = null; - var editor_link = JX.$('editor_link'); + + var editor_link = null; + try { + editor_link = JX.$('editor_link'); + } catch (ex) { + // Ignore. + } function getRowNumber(tr) { var th = JX.DOM.find(tr, 'th', 'phabricator-source-line');