From 2f2121d794e26a197d49525c298f4daa707ab496 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 13 Aug 2016 00:59:21 +0200 Subject: [PATCH] Fixed store of task state. --- .../app/controllers/agent_ticket_create.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee index 72fb148d7..930577cde 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee @@ -132,10 +132,10 @@ class App.TicketCreate extends App.Controller autosaveStart: => if !@autosaveLast - state = App.TaskManager.get(@task_key) - if !state - state = {} - @autosaveLast = state || {} + task = App.TaskManager.get(@task_key) + if task && !task.state + task.state = {} + @autosaveLast = task.state || {} update = => data = @formParam(@$('.ticket-create')) return if _.isEmpty(data)