From d0ce8c318c7324b23b0e14aa1af21c229309348b Mon Sep 17 00:00:00 2001 From: Xinhao Yuan Date: Mon, 8 Jul 2019 00:14:23 -0400 Subject: [PATCH] fix --- editor.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editor.lua b/editor.lua index 3c97dbe..28a5cbf 100644 --- a/editor.lua +++ b/editor.lua @@ -128,6 +128,10 @@ local function create(data) }) end + if data.cmds == nil then + data.cmds = {} + end + local gap = data.gap or 0 local closed_areas @@ -357,10 +361,6 @@ local function create(data) end local function start_interactive() - if data.cmds == nil then - data.cmds = {} - end - local cmd_index = #data.cmds + 1 data.cmds[cmd_index] = ""