Fix bad string coercion; setting :getter returns a string, not an int (#12)

This commit is contained in:
neatchee 2022-12-29 18:47:58 -08:00
parent ef665c1df5
commit 0fce108d21

View File

@ -251,7 +251,7 @@ class Status extends ImmutablePureComponent {
// as it could cause surprising changes when receiving notifications
if (settings.getIn(['content_warnings', 'shared_state']) && status.get('spoiler_text').length && !status.get('hidden')) return;
let autoCollapseHeight = autoCollapseSettings.get('height');
let autoCollapseHeight = parseInt(autoCollapseSettings.get('height'));
if (status.get('media_attachments').size && !muted) {
autoCollapseHeight += 300;
}