From d344f599b2e5e1d0e3562abe5f0be05cba4e08e2 Mon Sep 17 00:00:00 2001 From: MoyuScript Date: Wed, 30 Aug 2017 20:59:18 +0800 Subject: [PATCH] Set default config as empty object (Fix #1195) --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 126e9a1..f9b6b8b 100644 --- a/src/index.js +++ b/src/index.js @@ -32,7 +32,7 @@ export type Options = { offsetY: number }; -const html2canvas = (element: HTMLElement, config: Options): Promise<*> => { +const html2canvas = (element: HTMLElement, config: Options = {}): Promise<*> => { if (typeof console === 'object' && typeof console.log === 'function') { console.log(`html2canvas ${__VERSION__}`); }