Skip to content

Internal state of object changes when running planner #129

@mielvds

Description

@mielvds

When calling the planner as follows:

let from = { latitude: 51.054556,
  longitude: 3.725333,
  name: 'A' };
let to = { latitude: 51.04892,
  longitude: 3.728874,
  name: 'B' };
planner.query({
    from, to
  })
    .take(3)
    .on('end', () => {
      console.log(from)
    });

the id attribute of fromand to will be changed to for example "Departure Point" which is undesireable behavior and will cause problems when using const. Better to make a copy of these ILocation objects in the planner.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions