Skip to content

Commit 9cd6545

Browse files
committed
Use ! to silence ts about possible undefined
1 parent 51e6eb4 commit 9cd6545

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib/plugins/retina-images/walker.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ function attr(v: unknown): string {
3939

4040
async function toImgTag(node: Image, options: Options): Promise<HTML> {
4141
let size = await imageSize(pathFor(node.url, options));
42-
// @ts-ignore
43-
let width = Math.floor(size.width / 2);
44-
// @ts-ignore
45-
let height = Math.floor(size.height / 2);
42+
let width = Math.floor(size!.width! / 2);
43+
let height = Math.floor(size!.height! / 2);
4644

4745
let attrs = [];
4846

0 commit comments

Comments
 (0)