WMDE-leszek has uploaded a new change for review. https://gerrit.wikimedia.org/r/288627
Change subject: Fix height of bars for revisions that haven't changed the page size ...................................................................... Fix height of bars for revisions that haven't changed the page size Zero has been passed to Math.log which returned -Infinity resulting in incorrect size of a "negative" bar. Bug: T135219 Change-Id: I5facc94f8cb555a95d730cc507df21399124913d --- M modules/ext.RevisionSlider.RevisionListView.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider refs/changes/27/288627/1 diff --git a/modules/ext.RevisionSlider.RevisionListView.js b/modules/ext.RevisionSlider.RevisionListView.js index dc2dcd0..ba2c77e 100644 --- a/modules/ext.RevisionSlider.RevisionListView.js +++ b/modules/ext.RevisionSlider.RevisionListView.js @@ -17,7 +17,7 @@ for ( i = 0; i < revs.length; i++ ) { diffSize = revs[ i ].getRelativeSize(); - relativeChangeSize = Math.ceil( 65.0 * Math.log( Math.abs( diffSize ) ) / maxChangeSizeLogged ) + 5; + relativeChangeSize = diffSize !== 0 ? Math.ceil( 65.0 * Math.log( Math.abs( diffSize ) ) / maxChangeSizeLogged ) + 5 : 0; $tooltip = this.makeTooltip( revs[ i ] ); $html -- To view, visit https://gerrit.wikimedia.org/r/288627 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5facc94f8cb555a95d730cc507df21399124913d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RevisionSlider Gerrit-Branch: master Gerrit-Owner: WMDE-leszek <leszek.mani...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits