Skip to content

Commit a8d0bad

Browse files
authored
Check if networkHandler is a function before calling
1 parent acb871e commit a8d0bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/radfish/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class Application {
4343
this._registerEventListeners();
4444

4545
// Check initial network status if handler provided
46-
if (this._networkHandler) {
46+
if (typeof this._networkHandler === 'function') {
4747
this._networkHandler(navigator.connection, (status) => {
4848
this._handleNetworkStatusChange(status);
4949
});

0 commit comments

Comments
 (0)