diff --git a/src/generators/dom/index.js b/src/generators/dom/index.js index 4f829776fdf7..ee08ab439411 100644 --- a/src/generators/dom/index.js +++ b/src/generators/dom/index.js @@ -302,7 +302,7 @@ export default function dom ( parsed, source, options ) { constructorBlock.addBlock( generator.builders.metaBindings ); } - if ( templateProperties.computed ) { + if ( computations.length ) { constructorBlock.addLine( `${generator.alias( 'recompute' )}( this._state, this._state, {}, true );` ); diff --git a/test/generator/samples/computed-empty/_config.js b/test/generator/samples/computed-empty/_config.js new file mode 100644 index 000000000000..226be4cffee9 --- /dev/null +++ b/test/generator/samples/computed-empty/_config.js @@ -0,0 +1,8 @@ +export default { + html: '