CoffeeScriptRedux
CoffeeScriptRedux copied to clipboard
Unintentional difference in promise-style indentation
Placing .then in a.then(b) in the same indent level of a produces different results in jashkenas/coffee-script vs redux.
$.get('/notifications')
.then ->
$.post('/notifications/read')
.then (result) ->
alert result
jashkenas/coffee-script:
$.get('/users').then(function(data) {
return $.post('/users', data);
}).then(function(result) {
return alert(result);
});
Redux:
Syntax error on line 4, column 0: unexpected '.' (\u002E)
1 : $.get('/users')
2 : .then (data) ->
3 : $.post('/users', data)
4 : .then (result) ->
^ :~^
5 : alert(result)
I get this as well
Redux doesn't allow variable indentation anymore. Check if you're using space & tabs combined by accident.
I do have this problem as well (see: https://github.com/michaelficarra/CoffeeScriptRedux/issues/22)
I did make sure to just have 2-spaces for indentation