Fix version logging (Fix #1421)

This commit is contained in:
Niklas von Hertzen 2018-02-15 22:07:40 +08:00
parent 9fb9898894
commit da2794f7f7

View File

@ -34,14 +34,9 @@ export type Options = {
}; };
const html2canvas = (element: HTMLElement, conf: ?Options): Promise<*> => { const html2canvas = (element: HTMLElement, conf: ?Options): Promise<*> => {
// eslint-disable-next-line no-console
if (typeof console === 'object' && typeof console.log === 'function') {
// eslint-disable-next-line no-console
console.log(`html2canvas ${__VERSION__}`);
}
const config = conf || {}; const config = conf || {};
const logger = new Logger(typeof config.logging === 'boolean' ? config.logging : true); const logger = new Logger(typeof config.logging === 'boolean' ? config.logging : true);
logger.log(`html2canvas ${__VERSION__}`);
if (__DEV__ && typeof config.onrendered === 'function') { if (__DEV__ && typeof config.onrendered === 'function') {
logger.error( logger.error(