fix: use "logger" instead of console.error
... to be graceful with older browser without "console"
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createNewLookupObject } from './create-new-lookup-object';
|
||||
import * as logger from '../logger';
|
||||
|
||||
export function createProtoAccessControl(runtimeOptions) {
|
||||
let defaultMethodWhiteList = Object.create(null);
|
||||
@@ -44,9 +45,9 @@ function checkWhiteList(protoAccessControlForType, propertyName) {
|
||||
if (protoAccessControlForType.defaultValue !== undefined) {
|
||||
return protoAccessControlForType.defaultValue;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(
|
||||
logger.log(
|
||||
'error',
|
||||
`Handlebars: Access has been denied to resolve the property "${propertyName}" because it is not an "own property" of its parent.\n` +
|
||||
`You can add a runtime option to disable the check or this warning:\n` +
|
||||
`See http://localhost:8080/api-reference/runtime-options.html#options-to-control-prototype-access for details`
|
||||
|
||||
Reference in New Issue
Block a user