mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: prevent generate empty regex
This commit is contained in:
parent
aa865d5812
commit
130f42f8a8
1 changed files with 3 additions and 1 deletions
|
|
@ -59,7 +59,9 @@ const RawFileExplorer: React.FC<Props & ConnectorState> = function RawFileExplor
|
|||
<VirtualNode
|
||||
index={index}
|
||||
style={style}
|
||||
regex={isValidRegexpSource(searchKey) ? new RegExp(searchKey, 'gi') : undefined}
|
||||
regex={
|
||||
searchKey && isValidRegexpSource(searchKey) ? new RegExp(searchKey, 'gi') : undefined
|
||||
}
|
||||
onNodeClick={onNodeClick}
|
||||
renderActions={renderActions}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue