Merge branch 'coffeescript_syntax_error' into 'master'
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
This commit is contained in:
commit
f150b8a5b9
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue