question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

isObject is too strict of a check for fameworks that provide access to turf eg nodered. causes many modules to reject a legitimate options object

See original GitHub issue

Please provide the following when reporting an issue:

  • GeoJSON data as a gist file or geojson.io (filename extension must be .geojson).
  • Snippet of source code or for complex examples use jsfiddle.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
willvincentcommented, Jul 22, 2020

This is a major issue, yes.

node v12.16.1, turf 5.1.6:

> turf.helpers.isObject({})
false
> turf.helpers.isObject(new Object())
false

Both of those, absolutely should resolve to true, but do not… as a result, it’s impossible to use the options param on basically any turf method.

Seems like instead of input.constructor === Object the check really ought to be typeof input === 'object'

1reaction
stebogitcommented, Jul 1, 2019

@spydmobile would you please provide some examples of the actual issue? That will help us to better understanding the extent of the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Process object memoryUsage() - General - Node-RED Forum
I'd like to access the process object inside the function code, such as to know the memory usage of the runtime: msg.payload =...
Read more >
[uibuilder new release] v5.1.1 - Some nice new features and ...
The new client library introduces the concept of configuration-driven UI's. Create a UI partially or fully from JSON data either from files, web ......
Read more >
Where to define class to use in multiple nodes
These are passing json objects. To create these objects I use multiple classes. This works fine as long as the class definition is...
Read more >
Problem with node-red-contrib-actionflows since upgrade to ...
Since upgrade to 2.2.0, the "action in"-process isn't triggered anymore. Log-Entry RED.settings.functionGlobalContext.get is not a function ...
Read more >
Creation of external objects in function node fails (solved)
I have a problem to understand or to use external modules with new features in the function node. I tried it first the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found