Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling undefined values #351

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Conversation

SivashankaranK
Copy link
Contributor

Passing "united states" as a attribute for the geocoder, like
const data: any = await geocoder.geocode(location);

but getting Error:

return target.apply(this, arguments);
^
TypeError: Cannot read properties of undefined (reading 'View')
at /home/aximsoft/Project/secuvy/api/command-center/node_modules/node-geocoder/lib/geocoder/heregeocoder.js:81:36
at tryCatcher (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/util.js:16:23)
at Promise.successAdapter [as _fulfillmentHandler0] (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/nodeify.js:23:30)
at Promise._settlePromise (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/promise.js:601:21)
at Promise._settlePromise0 (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (node:internal/timers:478:21)
at process.topLevelDomainCallback (node:domain:160:15)
at process.callbackTrampoline (node:internal/async_hooks:128:24)


Passing "united states" as a attribute for the geocoder, like
    const data: any = await geocoder.geocode(location);

but getting Error:

return target.apply(this, arguments);
                      ^
TypeError: Cannot read properties of undefined (reading 'View')
    at /home/aximsoft/Project/secuvy/api/command-center/node_modules/node-geocoder/lib/geocoder/heregeocoder.js:81:36
    at tryCatcher (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.successAdapter [as _fulfillmentHandler0] (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/nodeify.js:23:30)
    at Promise._settlePromise (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/promise.js:601:21)
    at Promise._settlePromise0 (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues (/home/aximsoft/Project/secuvy/api/command-center/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (node:internal/timers:478:21)
    at process.topLevelDomainCallback (node:domain:160:15)
    at process.callbackTrampoline (node:internal/async_hooks:128:24)
Copy link
Owner

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing that

@nchaulet nchaulet merged commit 9b3b702 into nchaulet:master Feb 7, 2024
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants