Set default config as empty object (Fix #1195)

This commit is contained in:
Niklas von Hertzen 2017-08-30 20:59:18 +08:00
parent b75fd70042
commit a41ba8852f

View File

@ -32,7 +32,7 @@ export type Options = {
offsetY: number offsetY: number
}; };
const html2canvas = (element: HTMLElement, config: Options): Promise<*> => { const html2canvas = (element: HTMLElement, config: Options = {}): Promise<*> => {
if (typeof console === 'object' && typeof console.log === 'function') { if (typeof console === 'object' && typeof console.log === 'function') {
console.log(`html2canvas ${__VERSION__}`); console.log(`html2canvas ${__VERSION__}`);
} }