diff --git a/package.json b/package.json index 96c3cc4..7fd2607 100644 --- a/package.json +++ b/package.json @@ -46,19 +46,19 @@ "benchmark": "^2.1.4", "chai": "^4.2.0", "coveralls": "^3.1.0", - "eslint": "^7.14.0", + "eslint": "^7.16.0", "eslint-config-riot": "^3.0.0", "esm": "^3.2.25", "jsdom": "^16.4.0", "jsdom-global": "3.0.2", "mocha": "^8.2.1", "nyc": "^15.1.0", - "rollup": "^2.33.3", + "rollup": "^2.35.1", "rollup-plugin-alias": "^2.2.0", "rollup-plugin-node-resolve": "^5.2.0", - "sinon": "^9.2.1", + "sinon": "^9.2.2", "sinon-chai": "^3.5.0", - "typescript": "^4.1.2" + "typescript": "^4.1.3" }, "dependencies": { "@riotjs/util": "^2.0.0" diff --git a/src/template.js b/src/template.js index ab5f9a4..1c9ab5a 100644 --- a/src/template.js +++ b/src/template.js @@ -1,4 +1,5 @@ import { cleanNode, clearChildren, removeChild } from '@riotjs/util/dom' +import {IS_PURE_SYMBOL} from '@riotjs/util/constants' import createBinding from './binding' import createDOMTree from './util/create-DOM-tree' import injectDOM from './util/inject-DOM' @@ -121,6 +122,9 @@ export const TemplateChunk = Object.freeze({ this.bindings.forEach(b => b.unmount(scope, parentScope, mustRemoveRoot)) switch (true) { + // pure components should handle the DOM unmount updates by themselves + case this.el[IS_PURE_SYMBOL]: + break //