mirror of
https://github.com/wassname/nvatom.git
synced 2026-07-11 00:40:46 +08:00
Do not create an empty note when search panel query is empty
This commit is contained in:
@@ -89,9 +89,10 @@ class NotationalVelocityView extends SelectListView
|
||||
@cancel()
|
||||
else
|
||||
sanitizedQuery = @getFilterQuery().replace(/\s+$/, '')
|
||||
filePath = path.join(@rootDirectory, sanitizedQuery + '.md')
|
||||
fs.writeFileSync(filePath, '')
|
||||
atom.workspace.open(filePath)
|
||||
if sanitizedQuery.length > 0
|
||||
filePath = path.join(@rootDirectory, sanitizedQuery + '.md')
|
||||
fs.writeFileSync(filePath, '')
|
||||
atom.workspace.open(filePath)
|
||||
@cancel()
|
||||
|
||||
destroy: ->
|
||||
|
||||
Reference in New Issue
Block a user