fix(create-file): when node is nil, create the file at root
fixes #1467
This commit is contained in:
@@ -48,8 +48,8 @@ local function get_containing_folder(node)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.fn(node)
|
function M.fn(node)
|
||||||
node = lib.get_last_group_node(node)
|
node = node and lib.get_last_group_node(node)
|
||||||
if node.name == ".." then
|
if not node or node.name == ".." then
|
||||||
node = {
|
node = {
|
||||||
absolute_path = core.get_cwd(),
|
absolute_path = core.get_cwd(),
|
||||||
nodes = core.get_explorer().nodes,
|
nodes = core.get_explorer().nodes,
|
||||||
|
|||||||
Reference in New Issue
Block a user