Commit 5a044dc2 authored by Mike Greiling's avatar Mike Greiling

refactor option defaults

parent 1f3225a5
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment