Created
December 23, 2015 23:18
-
-
Save courthead/8134377fe7b5c0c202f7 to your computer and use it in GitHub Desktop.
This file contains 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 optionalFunction(orderedArgs/*, namedArgs*/) { | |
const actionFn = orderedArgs[0]; | |
return function (event) { | |
return actionFn ? actionFn(event) : undefined; | |
}; | |
} | |
export default Ember.Helper.helper(optionalFunction); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment