Fix extension to work with latest state changes

Refs flarum/core#2156.
This commit is contained in:
Franz Liedke 2020-06-26 16:04:02 +02:00
parent 541b1a59d3
commit 1ae36a0b64

View File

@ -16,8 +16,8 @@ export default function addLockControl() {
DiscussionControls.lockAction = function() {
this.save({isLocked: !this.isLocked()}).then(() => {
if (app.current instanceof DiscussionPage) {
app.current.stream.update();
if (app.current.matches(DiscussionPage)) {
app.current.get('stream').update();
}
m.redraw();