@riotjs/dom-bindings
Advanced tools
Comparing version 9.2.0 to 9.2.1
@@ -828,2 +828,3 @@ import { insertBefore, removeChild, replaceChild, cleanNode, moveChildren, clearChildren } from '@riotjs/util/dom'; | ||
attributes: [], | ||
// templateData: null, | ||
// template: null, | ||
@@ -841,4 +842,8 @@ | ||
const { parentNode } = this.node; | ||
const realParent = getRealParent(scope, parentScope); | ||
// if the slot did not pass any content, we will use the self slot for optional fallback content (https://github.com/riot/riot/issues/3024) | ||
const realParent = templateData ? getRealParent(scope, parentScope) : scope; | ||
this.templateData = templateData; | ||
// override the template property if the slot needs to be replaced | ||
@@ -870,3 +875,6 @@ this.template = | ||
if (this.template) { | ||
const realParent = getRealParent(scope, parentScope); | ||
const realParent = this.templateData | ||
? getRealParent(scope, parentScope) | ||
: scope; | ||
this.template.update(this.getTemplateScope(scope, realParent), realParent); | ||
@@ -873,0 +881,0 @@ } |
{ | ||
"name": "@riotjs/dom-bindings", | ||
"version": "9.2.0", | ||
"version": "9.2.1", | ||
"description": "Riot.js DOM bindings", | ||
@@ -20,5 +20,6 @@ "main": "dist/dom-bindings.cjs", | ||
"build": "rollup -c", | ||
"build-bench": "rollup -c benchmarks/rollup.config.js", | ||
"pretest": "npm run build", | ||
"postest": "npm run cov-html", | ||
"bench": "node --expose-gc benchmarks/index.cjs", | ||
"bench": "node --expose-gc benchmarks/index.js", | ||
"test": "npm run lint && c8 mocha -r test/index.js 'test/**/*.spec.js' && npm run test-typing", | ||
@@ -54,17 +55,17 @@ "test-typing": "tsc -p test", | ||
"@riotjs/prettier-config": "^1.1.0", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@rollup/plugin-node-resolve": "^15.3.0", | ||
"benchmark": "^2.1.4", | ||
"c8": "^10.1.2", | ||
"chai": "^4.4.1", | ||
"chai": "^5.1.1", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^8.57.0", | ||
"eslint-config-riot": "^4.1.2", | ||
"jsdom": "^24.1.1", | ||
"jsdom": "^25.0.1", | ||
"jsdom-global": "3.0.2", | ||
"mocha": "^10.7.3", | ||
"prettier": "^3.3.3", | ||
"rollup": "^4.20.0", | ||
"sinon": "^18.0.0", | ||
"sinon-chai": "^3.7.0", | ||
"typescript": "^5.5.4" | ||
"rollup": "^4.24.0", | ||
"sinon": "^19.0.2", | ||
"sinon-chai": "^4.0.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
@@ -71,0 +72,0 @@ "dependencies": { |
@@ -30,2 +30,3 @@ import { cleanNode, insertBefore, removeChild } from '@riotjs/util/dom' | ||
attributes: [], | ||
// templateData: null, | ||
// template: null, | ||
@@ -43,4 +44,8 @@ | ||
const { parentNode } = this.node | ||
const realParent = getRealParent(scope, parentScope) | ||
// if the slot did not pass any content, we will use the self slot for optional fallback content (https://github.com/riot/riot/issues/3024) | ||
const realParent = templateData ? getRealParent(scope, parentScope) : scope | ||
this.templateData = templateData | ||
// override the template property if the slot needs to be replaced | ||
@@ -72,3 +77,6 @@ this.template = | ||
if (this.template) { | ||
const realParent = getRealParent(scope, parentScope) | ||
const realParent = this.templateData | ||
? getRealParent(scope, parentScope) | ||
: scope | ||
this.template.update(this.getTemplateScope(scope, realParent), realParent) | ||
@@ -75,0 +83,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
156944
4028