summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-02-26 14:06:00 +0000
committerJacob Schatz <jschatz1@gmail.com>2016-02-26 14:06:00 +0000
commitf150b8a5b9a6f56151523061813bad2cf48c9d91 (patch)
tree339fedd9c1d00de17c2444b9d6858523f7b398d6
parentbb3563b5cd063772fa16c934404e7912d9f3d726 (diff)
parentb2c641de219d3aba8f1fce758b2f05ca8233e2d6 (diff)
downloadgitlab-ce-revert-9cc321ca.tar.gz
Merge branch 'coffeescript_syntax_error' into 'master' revert-9cc321ca
Fix syntax error in autosave coffeescript. According to http://coffeescript.org/#try , `catch` needs to have an argument. Otherwise, `Error: Parse error on line 19: Unexpected 'INDENT'` error is raised when converting to JS by coffee-script. Fixes gitlab-org/gitlab-ce#3302 See merge request !2985
-rw-r--r--app/assets/javascripts/autosave.js.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/autosave.js.coffee b/app/assets/javascripts/autosave.js.coffee
index 5d3fe81da74..28f8e103664 100644
--- a/app/assets/javascripts/autosave.js.coffee
+++ b/app/assets/javascripts/autosave.js.coffee
@@ -16,11 +16,11 @@ class @Autosave
try
text = window.localStorage.getItem @key
- catch
+ catch e
return
@field.val text if text?.length > 0
- @field.trigger "input"
+ @field.trigger "input"
save: ->
return unless window.localStorage?
@@ -35,5 +35,5 @@ class @Autosave
reset: ->
return unless window.localStorage?
- try
+ try
window.localStorage.removeItem @key