Skip to content

Instantly share code, notes, and snippets.

@nire0510
Created February 29, 2016 11:17
Show Gist options
  • Save nire0510/56242fdf6a146828ad94 to your computer and use it in GitHub Desktop.
Save nire0510/56242fdf6a146828ad94 to your computer and use it in GitHub Desktop.
Ember helper: display fallback value if original is missing
import Ember from 'ember';
export function fallback(params/*, hash*/) {
return params[0] || params[1];
}
export default Ember.Helper.helper(fallback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment