Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Apr 10, 2019
1 parent 65a5b48 commit f1a9d4f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/utils/templatize.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,7 @@ function createTemplatizerClass(template, templateInfo, options) {
*/
function addPropagateEffects(template, templateInfo, options) {
let userForwardHostProp = options.forwardHostProp;
const hasHostProps = templateInfo.hasHostProps ||
(templateInfo.hasHostProps =
Boolean(templateInfo.hostProps &&
Object.keys(templateInfo.hostProps).length));
if (userForwardHostProp && hasHostProps) {
if (userForwardHostProp && templateInfo.hasHostProps) {
// Provide data API and property effects on memoized template class
let klass = templateInfo.templatizeTemplateClass;
if (!klass) {
Expand Down Expand Up @@ -427,6 +423,9 @@ function addNotifyEffects(klass, template, templateInfo, options) {
}
if (options.forwardHostProp && template.__dataHost) {
for (let hprop in hostProps) {
if (!templateInfo.hasHostProps) {
templateInfo.hasHostProps = true;
}
klass.prototype._addPropertyEffect(hprop,
klass.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,
{fn: createNotifyHostPropEffect()});
Expand Down

0 comments on commit f1a9d4f

Please sign in to comment.