Closed ardoramor closed 9 years ago
I'm not entirely sure that is true. If you look at the non-uglified Coffeescript, it's a little clearer that code above invokes the function type + 'Message'
where type is {'success', 'error', 'progress'}' if it's a function, otherwise just return the value of
type + 'Message'`. Trying to read uglified code can be misleading since its all mangled up. If you do happen to run into an real example where the above does not work, feel free to open a new issue with the examples and we'll be happy to help debug the issue.
Documentation states that successMessage, errorMessage, and progressMessage are able to take a function that returns an message configuration object. However, from the code below, the return of the function clearly expects a string:
If the function, in this case
n
, returns an object, it is later on written into 'message' during success and error states.