Device locator creating unexpected JSON (scanData) resulting in hook-error

I am using google-maps-device-locator library in my project. I have been working on it for over a month and the integration was working absolutely fine. Today, after some more coding, unexpectedly the scanData log for the library is showing me this:

scanData={“w”:{“a”:[{“m”:“4c:49:e3:71:a0:2f”,“s”:-30,“c”:11},{“m”:“94:65:2d:74:c8:31”,“s”:-46,“c”:7},{“m”:“58:d9:d5:fc:bc:b0”,“s”:-64,“c”:5},{“m”:“64:66:b3:f0:bc:d4”,“s”:-74,“c”:11},{“m”:“12:a0:96:f2:ef:fb”,“s”:-79,“c”:5},{“m”:“c8:3a:35:d7:e5:b8”,“s”:-79,“c”:11

The last {“m”:“c8:3a:35:d7:e5:b8”,“s”:-79,“c”:11 is extra and I don’t know why it is being added. The value should have ended before that with the closing ]}} braces.

The expected data should have been:
{“w”:{“a”:[{“m”:“4c:49:e3:71:a0:2f”,“s”:-30,“c”:11},{“m”:“94:65:2d:74:c8:31”,“s”:-37,“c”:7},{“m”:“58:d9:d5:fc:bc:b0”,“s”:-67,“c”:5},{“m”:“64:66:b3:f0:bc:d4”,“s”:-75,“c”:11},{“m”:“c8:3a:35:d7:e5:b8”,“s”:-77,“c”:11}]}}
(checked by creating an event on the console)

Anybody have any idea so as to why this might be happening?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.