fix: coreLogger not being bound correctly

This commit is contained in:
Alexis Tyler
2020-12-13 00:38:57 +10:30
parent 7dcf87cf0b
commit 837acab93d

View File

@@ -62,7 +62,7 @@ export const run = async (channel: string, mutation: string, options: RunOptions
if (process.env.NODE_ENV === 'production') {
coreLogger.debug('Error:', error.message);
} else {
const logger = coreLogger[error.status && error.status >= 400 ? 'error' : 'warn'];
const logger = coreLogger[error.status && error.status >= 400 ? 'error' : 'warn'].bind(coreLogger);
logger('Error:', error.message);
}
}