loader.js: Only discard content if a renderHook returns null

Previously any false value had this effect, though empty strings
were also discarded due to this. However, in case an empty string
is the content in the first place, the content must be updated.
This commit is contained in:
Johannes Meyer 2020-10-14 09:13:18 +02:00
parent 4ce9165f77
commit e68e8c8e9c
1 changed files with 1 additions and 1 deletions

View File

@ -1127,7 +1127,7 @@
$.each(_this.icinga.behaviors, function(name, behavior) {
if (behavior.renderHook) {
var changed = behavior.renderHook(content, $container, action, autorefresh);
if (!changed) {
if (changed === null) {
discard = true;
} else {
content = changed;