From a41ba8852f7cca4e0963981955a732b5924273e1 Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen 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__}`); }