From 5934207f82686f741e9a04da07650b72e5e79a66 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 27 Sep 2016 23:57:49 +0200 Subject: [PATCH] Fixed syntax error. --- app/assets/javascripts/app/lib/app_post/ajax.coffee | 8 ++++---- .../app/lib/app_post/z_searchable_ajax_select.coffee | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/app/lib/app_post/ajax.coffee b/app/assets/javascripts/app/lib/app_post/ajax.coffee index 4bd87c03a..bbe82a457 100644 --- a/app/assets/javascripts/app/lib/app_post/ajax.coffee +++ b/app/assets/javascripts/app/lib/app_post/ajax.coffee @@ -149,10 +149,10 @@ class _ajaxSingleton abortedIds runNextInQueue: => - if @queueList && @queueList[0] - @queueRunning = true - data = @queueList.shift() - @addCurrentRequest(params['id'], data, true) + return if !@queueList || !@queueList[0] + @queueRunning = true + data = @queueList.shift() + @addCurrentRequest(data['id'], data, true) _show_spinner: => @count++ diff --git a/app/assets/javascripts/app/lib/app_post/z_searchable_ajax_select.coffee b/app/assets/javascripts/app/lib/app_post/z_searchable_ajax_select.coffee index 7ec681a9c..a23409d6a 100644 --- a/app/assets/javascripts/app/lib/app_post/z_searchable_ajax_select.coffee +++ b/app/assets/javascripts/app/lib/app_post/z_searchable_ajax_select.coffee @@ -5,7 +5,7 @@ class App.SearchableAjaxSelect extends App.SearchableSelect # convert requested object # e.g. Ticket to ticket or AnotherObject to another_object - objectString = underscored( @options.attribute.object ) + objectString = underscored(@options.attribute.object) # create common accessors @apiPath = App.Config.get('api_path') @@ -45,13 +45,13 @@ class App.SearchableAjaxSelect extends App.SearchableSelect @searchResultCache[@cacheKey] = data # load assets - App.Collection.loadAssets( data.assets ) + App.Collection.loadAssets(data.assets) # get options from search result options = [] for object in data.result if object.type is 'Ticket' - ticket = App.Ticket.find( object.id ) + ticket = App.Ticket.find(object.id) data = name: "##{ticket.number} - #{ticket.title}" value: ticket.id @@ -63,7 +63,7 @@ class App.SearchableAjaxSelect extends App.SearchableSelect value: user.id options.push data else if object.type is 'Organization' - organization = App.Organization.find( object.id ) + organization = App.Organization.find(object.id) data = name: "#{organization.displayName()}" value: organization.id