PlasmoHQ / docs

📘 Documentation site
https://docs.plasmo.com
10 stars 50 forks source link

fix: listener removal in port docs #134

Closed nieheyong closed 1 week ago

nieheyong commented 1 week ago

In this PR, I fixed an issue where addListener and removeListener were not using the same reference for the listener function. This caused the removal of the listener to fail, as removeListener requires the exact function reference that was initially passed to addListener. To resolve this, I stored the listener function in a variable and reused it for both adding and removing the listener.

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 6:25am