From cc2b6fd53b7e47433af643063bc07f1addcde2d9 Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sat, 8 Apr 2017 16:03:51 -0400 Subject: [PATCH] make fragment constructor more explicit --- src/generators/dom/Fragment.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/generators/dom/Fragment.js b/src/generators/dom/Fragment.js index e1af01ccf7..490b16c845 100644 --- a/src/generators/dom/Fragment.js +++ b/src/generators/dom/Fragment.js @@ -1,6 +1,23 @@ export default class Fragment { - constructor ( options ) { - Object.assign( this, options ); + constructor ({ generator, name, key, expression, context, contextDependencies, component, contexts, indexes, params, indexNames, listNames, builders, getUniqueName }) { + this.generator = generator; + this.name = name; + this.key = key; + this.expression = expression; + this.context = context; + + this.component = component; + + this.contexts = contexts; + this.indexes = indexes; + this.contextDependencies = contextDependencies; + + this.params = params; + this.indexNames = indexNames; + this.listNames = listNames; + + this.builders = builders; + this.getUniqueName = getUniqueName; } addElement ( name, renderStatement, parentNode, needsIdentifier = false ) {