Skip to content

Commit

Permalink
Merge pull request #25 from achingbrain/fix/cb-is-not-a-function
Browse files Browse the repository at this point in the history
fix: pass a noop as a callback to bound functions
  • Loading branch information
alxhotel authored Aug 13, 2021
2 parents f91f16b + 9996370 commit b6efce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class NatAPI {

if (self.autoUpdate) {
self._upnpIntervals[opts.publicPort + ':' + opts.privatePort + '-' + opts.protocol] = setInterval(
self._upnpMap.bind(self, opts),
self._upnpMap.bind(self, opts, () => {}),
self._timeout
)
}
Expand Down Expand Up @@ -374,7 +374,7 @@ class NatAPI {

if (self.autoUpdate) {
self._pmpIntervals[opts.publicPort + ':' + opts.privatePort + '-' + opts.protocol] = setInterval(
self._pmpMap.bind(self, opts),
self._pmpMap.bind(self, opts, () => {}),
self._timeout
)
}
Expand Down

0 comments on commit b6efce5

Please sign in to comment.