fix: syntax fix (#2176)

This commit is contained in:
Sam Potts 2021-04-19 21:13:06 +10:00 committed by GitHub
parent e1ff86820c
commit 6ff6ff1673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,7 +87,7 @@ export function setAspectRatio(input) {
} }
const [x, y] = ratio; const [x, y] = ratio;
const useNative = window.CSS?.supports(`aspect-ratio: ${x} / ${y}`) ?? false; const useNative = window.CSS ? window.CSS.supports(`aspect-ratio: ${x} / ${y}`) : false;
const padding = (100 / x) * y; const padding = (100 / x) * y;
if (useNative) { if (useNative) {