mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-22 05:53:03 -04:00
Fixed endless redirect in palette change example
This commit is contained in:
@@ -71,9 +71,8 @@ calling the `super()` function at the beginning of the block:
|
||||
/* Register event handlers after documented loaded */
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var ref = document.querySelector("[data-md-component=palette]")
|
||||
component$.subscribe(function (component) {
|
||||
if (component.ref === ref)
|
||||
location.reload()
|
||||
ref.addEventListener("change", function() {
|
||||
location.reload()
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user