Skip to content

Commit 8b75ac0

Browse files
committed
Bug fix Sling Reactive clearSubscription
* Bug fix Sling Reactive clearSubscription. * Bump version to 20.3.1. * Add automated test for Sling Reactive bringing the total to 198.
1 parent aea0026 commit 8b75ac0

File tree

12 files changed

+47
-20
lines changed

12 files changed

+47
-20
lines changed

dist_sling/sling-reactive.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist_sling/sling.es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ var l = function l(_ref3) {
629629
}), t;
630630
};
631631
function version() {
632-
return "20.3.0";
632+
return "20.3.1";
633633
}
634634
var E = function E(t, e) {
635635
return t.split(e).length - 1;

dist_sling/sling.min.es5.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist_sling/sling.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist_sling/sling.min.nomodule.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist_sling/sling.slim.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sling.js",
3-
"version": "20.3.0",
3+
"version": "20.3.1",
44
"description": "Client-side JavaScript framework for building Single Page Applications.",
55
"main": "index.js",
66
"scripts": {

src/globalTests.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13035,6 +13035,33 @@ export class GlobalTestRunner {
1303513035
window.globalTestCount++;
1303613036
}
1303713037

13038+
testClearSubscriptionForSubjectWorks() {
13039+
const result = {
13040+
test: 'test clearSubscription for BehaviorSubject works',
13041+
success: false,
13042+
message: ''
13043+
};
13044+
13045+
const sub = BehaviorSubject(0);
13046+
let subscriberRuns = 0;
13047+
const subscriber = () => {
13048+
subscriberRuns++;
13049+
};
13050+
const subscriberToClear = () => {
13051+
return;
13052+
};
13053+
sub.subscribe(subscriber);
13054+
sub.subscribe(subscriberToClear);
13055+
sub.next(1);
13056+
sub.clearSubscription(subscriberToClear);
13057+
sub.next(2);
13058+
13059+
result.success = subscriberRuns === 2;
13060+
13061+
window.globalTestResults.push(result);
13062+
window.globalTestCount++;
13063+
}
13064+
1303813065
testAfterInitListExists() {
1303913066
const result = {
1304013067
test: 'test internal slAfterInit list exists',

src/sling/core/sling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ const _mountInternal = (target, component, attachDetector) => {
11151115
}
11161116

11171117
export function version() {
1118-
return '20.3.0';
1118+
return '20.3.1';
11191119
}
11201120

11211121
function xmur3(str) {

0 commit comments

Comments
 (0)