Fix some more Javascript linting issues and discrepancies with upstream (#2209)

* Fix typo in flavours/glitch/features/video/index.js

* Fix various linting issues and discrepancies with upstream
This commit is contained in:
Claire
2023-05-07 21:43:25 +02:00
committed by GitHub
parent ed0a407888
commit de74acbe0c
39 changed files with 87 additions and 200 deletions

View File

@@ -289,7 +289,7 @@ class MediaGallery extends React.PureComponent {
}
}
componentDidUpdate (prevProps) {
componentDidUpdate () {
if (this.node) {
this.handleResize();
}
@@ -327,7 +327,7 @@ class MediaGallery extends React.PureComponent {
_setDimensions () {
const width = this.node.offsetWidth;
if (width && width != this.state.width) {
if (width && width !== this.state.width) {
// offsetWidth triggers a layout, so only calculate when we need to
if (this.props.cacheWidth) {
this.props.cacheWidth(width);