mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-06-07 16:02:10 -04:00
Fixed endless redirect in palette change example
This commit is contained in:
@@ -56,9 +56,8 @@
|
||||
/* 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