Skip to content

Instantly share code, notes, and snippets.

@manico
Created March 23, 2018 09:00
Show Gist options
  • Save manico/e7732835d259c07a90e20175ae86f584 to your computer and use it in GitHub Desktop.
Save manico/e7732835d259c07a90e20175ae86f584 to your computer and use it in GitHub Desktop.
Vue Render Merge
Vue.config.optionMergeStrategies.render = (parentVal, childVal) => {
if (parentVal) {
const mergedParentVal = function render(...args) {
args.push([childVal.apply(this, args)]);
return parentVal.apply(this, args);
};
return mergedParentVal;
}
return childVal;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment