serversideup / webext-bridge

💬 Messaging in Web Extensions made easy. Batteries included.
https://serversideup.net/open-source/webext-bridge
MIT License
547 stars 50 forks source link

Fix formatEndpoint (skip background context) #44

Closed manubo closed 2 years ago

manubo commented 2 years ago

formatEndpoint should also skip formatting the background context.

Fixes #40

manubo commented 2 years ago

The reason the endpoint should not be formatted when the context is background, is that here https://github.com/zikaari/webext-bridge/blob/next/src/background.ts#L263 the endpointId is tested whether it equals to 'background', but if it is formatted, the endpointId is actuall 'background@null'.

zikaari commented 2 years ago

oh wow! thank you @manubo

zikaari commented 2 years ago

Now available in - webext-bridge@6.0.0-rc4

Thanks again!

manubo commented 2 years ago

@zikaari Great, thanks for the new release!