Skip to content

Commit 575d877

Browse files
committed
fix: use "logger" instead of console.error
... to be graceful with older browser without "console"
1 parent 7af1c12 commit 575d877

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/handlebars/internal/proto-access.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createNewLookupObject } from './create-new-lookup-object';
2+
import * as logger from '../logger';
23

34
export function createProtoAccessControl(runtimeOptions) {
45
let defaultMethodWhiteList = Object.create(null);
@@ -44,9 +45,9 @@ function checkWhiteList(protoAccessControlForType, propertyName) {
4445
if (protoAccessControlForType.defaultValue !== undefined) {
4546
return protoAccessControlForType.defaultValue;
4647
}
47-
4848
// eslint-disable-next-line no-console
49-
console.error(
49+
logger.log(
50+
'error',
5051
`Handlebars: Access has been denied to resolve the property "${propertyName}" because it is not an "own property" of its parent.\n` +
5152
`You can add a runtime option to disable the check or this warning:\n` +
5253
`See http://localhost:8080/api-reference/runtime-options.html#options-to-control-prototype-access for details`

0 commit comments

Comments
 (0)