Fix callback not added to new PageChangeListener (#1658)

Fixes #1655

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born 2020-09-20 14:28:06 +02:00 committed by GitHub
parent fc65deca01
commit 979e80ee9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -251,9 +251,8 @@ public class SitemapSubscriptionService implements ModelRepositoryChangeListener
// there is no listener for this page yet, so let's try to create one
listener = new PageChangeListener(sitemapName, pageId, itemUIRegistry, collectWidgets(sitemapName, pageId));
pageChangeListeners.put(getValue(sitemapName, pageId), listener);
} else {
listener.addCallback(callback);
}
listener.addCallback(callback);
}
private EList<Widget> collectWidgets(String sitemapName, String pageId) {