Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 6afa3fa

Browse files
authored
Merge pull request #6430 from matrix-org/dbkr/yarn_upgrade_210721
yarn upgrade
2 parents 80e6460 + a6c432d commit 6afa3fa

File tree

3 files changed

+1766
-1774
lines changed

3 files changed

+1766
-1774
lines changed

src/stores/UIStore.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ limitations under the License.
1515
*/
1616

1717
import EventEmitter from "events";
18-
import ResizeObserver from 'resize-observer-polyfill';
18+
// XXX: resize-observer-polyfill has types that now conflict with typescript's
19+
// own DOM types: https://github.com/que-etc/resize-observer-polyfill/issues/80
20+
// Using require here rather than import is a horrenous workaround. We should
21+
// be able to remove the polyfill once Safari 14 is released.
22+
const ResizeObserverPolyfill = require('resize-observer-polyfill'); // eslint-disable-line @typescript-eslint/no-var-requires
1923
import ResizeObserverEntry from 'resize-observer-polyfill/src/ResizeObserverEntry';
2024

2125
export enum UI_EVENTS {
@@ -43,7 +47,7 @@ export default class UIStore extends EventEmitter {
4347
// eslint-disable-next-line no-restricted-properties
4448
this.windowHeight = window.innerHeight;
4549

46-
this.resizeObserver = new ResizeObserver(this.resizeObserverCallback);
50+
this.resizeObserver = new ResizeObserverPolyfill(this.resizeObserverCallback);
4751
this.resizeObserver.observe(document.body);
4852
}
4953

src/utils/PasswordScorer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
import zxcvbn from 'zxcvbn';
17+
import zxcvbn, { ZXCVBNFeedbackWarning } from 'zxcvbn';
1818

1919
import { MatrixClientPeg } from '../MatrixClientPeg';
2020
import { _t, _td } from '../languageHandler';
@@ -84,7 +84,7 @@ export function scorePassword(password: string) {
8484
}
8585
// and warning, if any
8686
if (zxcvbnResult.feedback.warning) {
87-
zxcvbnResult.feedback.warning = _t(zxcvbnResult.feedback.warning);
87+
zxcvbnResult.feedback.warning = _t(zxcvbnResult.feedback.warning) as ZXCVBNFeedbackWarning;
8888
}
8989

9090
return zxcvbnResult;

0 commit comments

Comments
 (0)