mirror of
https://github.com/unraid/api.git
synced 2026-05-06 23:20:30 -05:00
fix: coreLogger not being bound correctly
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user