From 4aa09e63cf0dbaf632827105e52b9006dc9c20c4 Mon Sep 17 00:00:00 2001 From: Oliver Foster Date: Tue, 5 Mar 2024 11:12:46 +0000 Subject: [PATCH] Fix: Use parent children instead of stored siblings (#213) --- js/TrickleButtonModel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/TrickleButtonModel.js b/js/TrickleButtonModel.js index 989b869..abc4611 100644 --- a/js/TrickleButtonModel.js +++ b/js/TrickleButtonModel.js @@ -56,7 +56,8 @@ export default class TrickleButtonModel extends ComponentModel { // Check if completion is blocked by another extension const isCompletionBlocked = (parentModel.get('_requireCompletionOf') === Number.POSITIVE_INFINITY); if (isCompletionBlocked) return; - return this.getSiblings().every(sibling => { + // use getParent().getChildren() instead of getSiblings() as children change but siblings don't + return this.getParent().getChildren().every(sibling => { if (sibling === this) { return true; }