Skip to content

Commit

Permalink
Fix transclusion refreshing
Browse files Browse the repository at this point in the history
Missed off 80ee5ad
  • Loading branch information
Jermolene committed Mar 19, 2021
1 parent 80ee5ad commit 9af6829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/modules/widgets/transclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
TranscludeWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) {
if(Object.keys(changedAttributes).length || changedTiddlers[this.transcludeTitle]) {

This comment has been minimized.

Copy link
@saqimtiaz

saqimtiaz Mar 22, 2021

Contributor

Just an FYI that we do have a $tw.utils.count method that we could use instead of Object.keys(changedAttributes).length

This comment has been minimized.

Copy link
@Jermolene

Jermolene Mar 22, 2021

Author Owner

Thanks @saqimtiaz

this.refreshSelf();
return true;
} else {
Expand Down

0 comments on commit 9af6829

Please sign in to comment.