open-lms-open-source / moodle-theme_snap

GNU General Public License v3.0
79 stars 75 forks source link

Javascript MutationObserver Error #269

Open ChaoticDalo opened 9 months ago

ChaoticDalo commented 9 months ago

On a vanilla install of Moodle 4.1.x with Snap installed I keep seeing the following error:

snap-ce.js:1 Uncaught TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'. at o..f.. [as observe] (snap-ce.js:1:19691) at HTMLDocument. (snap.js:1226:39) at mightThrow (jquery-3.6.1.js:3766:29) at process (jquery-3.6.1.js:3834:12) at l.invokeTask (snap-ce.js:1:8751) at i.runTask (snap-ce.js:1:4160) at invokeTask (snap-ce.js:1:9801) at invoke (snap-ce.js:1:9703) at n.args. (snap-ce.js:1:33675)

Can you please do some fixy-fu on it, thx.

ChaoticDalo commented 9 months ago

Ah, I found the issue. snap.js line 1213: var targetTilesSect = document.querySelector('section#tiles-section');

targetTilesSect is null and you are trying to do stuff with it so.......