Fixed not found calculation warnings showing [object Object]

They were using the wrong "toString" method
This commit is contained in:
Stefan Zermatten
2022-02-22 18:02:57 +02:00
parent 8f30c1419c
commit 80460ceaed
2 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import constant from './constant.js';
import { toString } from '../resolve.js';
const accessor = {
create({name, path}) {
@@ -53,7 +54,7 @@ const accessor = {
reduce(node, scope, context){
let { result } = accessor.compile(node, scope, context);
if (result.parseType === 'accessor'){
context.error(`${accessor.toString(result)} not found, set to 0`);
context.error(`${toString(result)} not found, set to 0`);
return {
result: constant.create({
value: 0,