MightyHive / chrome-extension

0 stars 0 forks source link

Circular data structures in Data Layers break #34

Closed jreidgreer closed 7 years ago

jreidgreer commented 7 years ago

Scope

InjectedScript

Category

Tech Debt

Description

Though this appears to be rare (I've only encountered it on this one site), circular data structures within Data Layers cause during stringification. The Injected Script uses JSON.stringify to turn DL objects into a string that can be passed via a DOM Event. This is one of the few ways of sending data in the page's runtime to the extensions.

While it's possible this is a acceptable bug, it probably needs to be handled more gracefully.

Replication

https://www.ratecity.com.au/personal-loans/best

The above site throws this error upon load.