I've been running into a difficult-to-reproduce bug where sometimes a tab update doesn't contain a url property, and the tracked url for that tab gets set to undefined, causing all rules to fail to match within that tab.
Though intermittent, it appears to only happen when I have other extensions turned on (React DevTools might be a culprit). Whatever the cause, the Chrome API does seem to specify that the url property can be unset on a Tab if the tab hasn't "committed", whatever that means.
In any case, it's fixable by looking at the changeinfo object for the url property and skipping the update if it hasn't changed - which should also make for fewer updates to the tabUrlTracker, so this seems like a net win all round.
Yeah this looks good to me. I will need to update this extension to use manifest v3 soonish if I want to keep it alive so this can go out with that update probably.
Hello! I love this extension!
I've been running into a difficult-to-reproduce bug where sometimes a tab update doesn't contain a
url
property, and the tracked url for that tab gets set toundefined
, causing all rules to fail to match within that tab.Though intermittent, it appears to only happen when I have other extensions turned on (React DevTools might be a culprit). Whatever the cause, the Chrome API does seem to specify that the
url
property can be unset on a Tab if the tab hasn't "committed", whatever that means.In any case, it's fixable by looking at the
changeinfo
object for theurl
property and skipping the update if it hasn't changed - which should also make for fewer updates to thetabUrlTracker
, so this seems like a net win all round.