Fixed not found calculation warnings showing [object Object]
They were using the wrong "toString" method
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import constant from './constant.js';
|
import constant from './constant.js';
|
||||||
|
import { toString } from '../resolve.js';
|
||||||
|
|
||||||
const accessor = {
|
const accessor = {
|
||||||
create({name, path}) {
|
create({name, path}) {
|
||||||
@@ -53,7 +54,7 @@ const accessor = {
|
|||||||
reduce(node, scope, context){
|
reduce(node, scope, context){
|
||||||
let { result } = accessor.compile(node, scope, context);
|
let { result } = accessor.compile(node, scope, context);
|
||||||
if (result.parseType === 'accessor'){
|
if (result.parseType === 'accessor'){
|
||||||
context.error(`${accessor.toString(result)} not found, set to 0`);
|
context.error(`${toString(result)} not found, set to 0`);
|
||||||
return {
|
return {
|
||||||
result: constant.create({
|
result: constant.create({
|
||||||
value: 0,
|
value: 0,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import resolve from '../resolve.js';
|
import resolve, { toString } from '../resolve.js';
|
||||||
import constant from './constant.js';
|
import constant from './constant.js';
|
||||||
|
|
||||||
const symbol = {
|
const symbol = {
|
||||||
@@ -46,7 +46,7 @@ const symbol = {
|
|||||||
if (result.parseType === 'symbol'){
|
if (result.parseType === 'symbol'){
|
||||||
context.error({
|
context.error({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: `${result.toString()} not found, set to 0`
|
message: `${toString(result)} not found, set to 0`
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
result: constant.create({value: 0}),
|
result: constant.create({value: 0}),
|
||||||
|
|||||||
Reference in New Issue
Block a user