diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-06-23 21:26:59 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-06-23 22:23:12 +0300 |
commit | 5a044dc25b1c04da6253577a3934e857a0c0bd0d (patch) | |
tree | fddf922f8de06807086c0105b60581892d4cb91d /app/assets/javascripts/behaviors | |
parent | 1f3225a5e375b370e76c98e47e8ed0b8bc67eac8 (diff) |
refactor option defaults
Diffstat (limited to 'app/assets/javascripts/behaviors')
-rw-r--r-- | app/assets/javascripts/behaviors/gl_emoji.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/assets/javascripts/behaviors/gl_emoji.js b/app/assets/javascripts/behaviors/gl_emoji.js index 36ce4fddb72..ca6117c4fd6 100644 --- a/app/assets/javascripts/behaviors/gl_emoji.js +++ b/app/assets/javascripts/behaviors/gl_emoji.js @@ -25,12 +25,9 @@ function assembleFallbackImageSrc(inputName) { return fallbackImageSrc; } -const glEmojiTagDefaults = { - sprite: false, - forceFallback: false, -}; + function glEmojiTag(inputName, options) { - const opts = Object.assign({}, glEmojiTagDefaults, options); + const opts = { sprite: false, forceFallback: false, ...options }; let name = Object.prototype.hasOwnProperty.call(emojiAliases, inputName) ? emojiAliases[inputName] : inputName; let emojiInfo = emojiMap[name]; |