SO-Close-Vote-Reviewers / UserScripts

Various user scripts that add features to the review queue or to the chat room
Other
57 stars 40 forks source link

Uncaught (in promise) TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'. #206

Closed cristik closed 2 years ago

cristik commented 2 years ago

After yesterday's deploy I noticed the *-pls userscript generates the following error:

Uncaught (in promise) TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.
    at startObservingTopbarStyle (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:5322:33)
    at adjustTopbarMarginToNotifyContainer (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:5311:13)
    at keepTopbarMarginAtNotifyConainer (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:5334:9)
    at eval (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:5337:5)
    at Proxy.tms_64c63223_4ab7_4f3b_8d65_d85a637eef57$ (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:5338:3)
    at nt (<anonymous>:13:1036)
    at eval (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:1:95)
    at eval (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:1:698)
    at eval (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:5339:6)
    at eval (userscript.html?name=Stack%20Exchange%20CV%20Request%20Generator.user.js&id=64c63223-4ab7-4f3b-8d65-d85a637eef57:5341:3)

I debugged a little bit, the fix is simple, just need to replace

const topBar = $('.top-bar').first();

by

const topBar = $('.s-topbar').first();

, so just a classname change.

makyen commented 2 years ago

Resolved in Version 2.0.2