Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit defded0

Browse files
sobishtnethip
authored andcommitted
Fix for FindInFiles UI not opening when no file is open (#14416)
* Add null check for editor * Cleanup: Use tertiary operator
1 parent db9583f commit defded0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/search/FindBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ define(function (require, exports, module) {
705705
*/
706706
FindBar.getInitialQuery = function (currentFindBar, editor) {
707707
var query,
708-
selection = FindBar._getInitialQueryFromSelection(editor),
708+
selection = editor ? FindBar._getInitialQueryFromSelection(editor) : "",
709709
replaceText = "";
710710

711711
if (currentFindBar && !currentFindBar.isClosed()) {

0 commit comments

Comments
 (0)