js: Really stop rendering if a hook discards content

This is a potential breaking change for behaviors which
rely on being able to change content in-place even if
the response's content is not applied. This is the case
for grafana's iframe behavior, though that's more a hack
than a necessity so it doesn't break. I've found no other
implementations so I guess it's fine including it here.
This commit is contained in:
Johannes Meyer 2024-02-06 10:51:04 +01:00
parent c79b513066
commit a48a6ebcb5
1 changed files with 1 additions and 0 deletions

View File

@ -1272,6 +1272,7 @@
const changed = hook.renderHook(content, $container, action, autorefresh, autoSubmit);
if (changed === null) {
discard = true;
break;
} else {
content = changed;
}