Skip to content

Commit

Permalink
Ensure TAB_ID_NONE is not mistaken for a real tab id
Browse files Browse the repository at this point in the history
  • Loading branch information
Gudahtt committed Dec 2, 2019
1 parent 72e8dfe commit 516ace2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/scripts/lib/createOnboardingMiddleware.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import log from 'loglevel'
import extension from 'extensionizer'

/**
* Returns a middleware that intercepts `wallet_registerOnboarding` messages
Expand All @@ -12,7 +13,7 @@ function createOnboardingMiddleware ({ location, tabId, registerOnboarding }) {
next()
return
}
if (tabId) {
if (tabId && tabId !== extension.tabs.TAB_ID_NONE) {
await registerOnboarding(location, tabId)
} else {
log.debug(`'wallet_registerOnboarding' message from ${location} ignored due to missing tabId`)
Expand Down

0 comments on commit 516ace2

Please sign in to comment.