Skip to content

Commit 2a0606c

Browse files
committed
fix deprecation warning check
1 parent fda8158 commit 2a0606c

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/shadow-objects/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to [@spearwolf/shadow-objects](https://github.com/spearwolf/
55
The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.26.2] - 2026-01-12
9+
10+
- fix the check for when the deprecation warning is shown in `provideContext()` and `provideGlobalContext()`
11+
812
## [0.26.1] - 2026-01-08
913

1014
- automatic clearing of the context value is now performed by default _after_ the user-defined `onDestroy()` hooks

packages/shadow-objects/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@spearwolf/shadow-objects",
33
"description": "a reactive entity-component framework that feels at home in the shadows",
4-
"version": "0.26.1",
4+
"version": "0.26.2",
55
"author": {
66
"name": "Wolfger Schramm",
77
"email": "wolfger@spearwolf.de",
@@ -91,4 +91,4 @@
9191
"@spearwolf/eventize": "^4.0.2",
9292
"@spearwolf/signalize": "^0.25.0"
9393
}
94-
}
94+
}

packages/shadow-objects/src/in-the-dark/Kernel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export class Kernel {
377377
) {
378378
let ctxProvider = contextProviders.get(name);
379379

380-
if (!provideContextOptionsDeprecatedShown && typeof options !== 'function') {
380+
if (!provideContextOptionsDeprecatedShown && options != null && typeof options === 'function') {
381381
console.warn(
382382
'[shadow-objects] Deprecation Warning: The "isEqual" option of "provideContext()" and "provideGlobalContext()" is now passed as {compare} argument. Please update your code accordingly.',
383383
);
@@ -418,7 +418,7 @@ export class Kernel {
418418
) {
419419
let ctxProvider = contextRootProviders.get(name);
420420

421-
if (!provideContextOptionsDeprecatedShown && typeof options !== 'function') {
421+
if (!provideContextOptionsDeprecatedShown && options != null && typeof options === 'function') {
422422
console.warn(
423423
'[shadow-objects] Deprecation Warning: The "isEqual" option of "provideContext()" and "provideGlobalContext()" is now passed as {compare} argument. Please update your code accordingly.',
424424
);

0 commit comments

Comments
 (0)