Created
          February 29, 2016 11:17 
        
      - 
      
 - 
        
Save nire0510/56242fdf6a146828ad94 to your computer and use it in GitHub Desktop.  
    Ember helper: display fallback value if original is missing
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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