Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix

Manav Rathif3bfc8525b5c
diff --git a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
index 6f1cb4a51e..7b33518870 100644
--- a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
+++ b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
@@ -42,7 +42,9 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
useEffect(() => {
castGateway.revokeAllTokens();
- setBrowserCanCast(typeof window.chrome !== "undefined");
+ // Otherwise tsc complains about unknown property chrome.
+ // eslint-disable-next-line @typescript-eslint/dot-notation
+ setBrowserCanCast(typeof window["chrome"] !== "undefined");
}, []);
const onSubmit: SingleInputFormProps["callback"] = async (
diff --git a/web/packages/build-config/eslintrc-react.mjs b/web/packages/build-config/eslintrc-react.mjs
index 92a848a92c..80d43d43f0 100644
--- a/web/packages/build-config/eslintrc-react.mjs
+++ b/web/packages/build-config/eslintrc-react.mjs
@@ -40,10 +40,10 @@ export default [
rules: {
...hooksPlugin.configs.recommended.rules,
// Apparently Fast refresh only works if a file only exports
- // components, and this rule warns about that.
+ // components, and this rule warns if we break that that.
//
- // Constants are okay though (otherwise we'll need to create
- // unnecessary helper files).
+ // Constants are okay though practically (otherwise we'll need to
+ // create unnecessary helper files).
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },