Skip to content

Commit 70cd8f4

Browse files
author
Kyle Andrews
committed
Fixed toaster notification null check bug
1 parent bc9215a commit 70cd8f4

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [1.2.1] - 2020-04-17
10+
## [1.2.2] - 2020-04-17
1111

1212
### Fixed
1313

1414
- toaster notification close button bug
15+
- fixed toaster null check bug
1516

1617
## [1.2.0] - 2020-04-04
1718

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codewithkyle/notifyjs",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "A simple JavaScript library for creating and managing toaster & snackbar notifications",
55
"main": "notify.js",
66
"types": "notify.d.ts",

src/notification-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export class NotificationManager {
349349
break;
350350
}
351351
}
352-
if (index) {
352+
if (index !== null) {
353353
this.removeToasterNotification(index);
354354
}
355355
};

0 commit comments

Comments
 (0)