From 3423db5276044518af833ed1d768d306779776db Mon Sep 17 00:00:00 2001 From: _Pear <63015754+CobyPear@users.noreply.github.com> Date: Sun, 7 Nov 2021 10:07:48 -0600 Subject: [PATCH] Set default crop option when using only height and width --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 5a83765..9631d27 100644 --- a/src/index.ts +++ b/src/index.ts @@ -65,6 +65,7 @@ export function image(node: HTMLImageElement, parameters: ImageParameters) { let { src, options, bind, lazy, step } = parameters log('Image Declared', parameters) options = options ?? {} + options.crop = options.crop ?? 'fill' step = step ?? 200 lazy = lazy ?? true