Skip to content

Commit

Permalink
Fix bug with empty pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Feb 9, 2019
1 parent 0f33ceb commit 95b40b3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fx.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ module.exports = function start(filename, source) {
json = source
}

findGen = find(json, highlight)
if (highlight) {
findGen = find(json, highlight)
}
render()
}

Expand All @@ -485,15 +487,15 @@ module.exports = function start(filename, source) {
}
highlight = regex

search.hide()

if (highlight) {
findGen = find(json, highlight)
findNext()
} else {
findGen = null
currentPath = null
}

search.hide()
search.setValue('')

box.height = '100%'
Expand Down

0 comments on commit 95b40b3

Please sign in to comment.