Conversation
|
Hi there. Thank you for your work and this plugin fork. Can we merge this @KindCoder-no ? I'm encountering exactly the same issue. |
|
Hi @avisiboni . Thanks for contributing, have you tested the code? And maybe show screenshots of the new code changes working |
|
I'm testing it. It fixes the [object Object] issue which is causing to fail to open a strapi record using that field. Using this fix, it does not fail anymore and the field works. Unfortunately I can see there is something wrong with the data saving. If I add a new location with lat and lng, it does not save this data to db table correctly. Displaying data from db works fine. |
|
Ok. Il have to check the code further. Since in our usecase, we only use lat/lng for locations |
|
Can't believe this is still not merged... |
Problem:
The JSON parsing logic currently attempts to parse objects that are already parsed, resulting in errors or unexpected behavior (e.g., parsing [object Object] as a string).
Solution:
This PR adds a check to ensure the input is not already a parsed object before attempting to parse it. This prevents double-parsing and resolves the issue.
Changes:
Added a validation step to detect and skip already parsed JSON objects.
Impact:
Prevents errors caused by unnecessary JSON parsing.
Improves the stability and reliability of the parsing logic.