Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harden _Q.push wrapper in the amzn_apstag.js shim
Apstag calls are queued onto the `window.apstag._Q` array and are then called when the Apstag script is ready. The shim expects each queued call to be an array containing the API method name prefix and arguments, e.g. ["f", {slots: [...], timeout: 3000}, () => { ... }] I noticed in practice however, some calls are queued differently, with a queued call looking something like this instead: [["f", Arguments([{slots: [...], timeout: 3000}, () => { ... }])]] Since the original script handles that, the shim needs to as well. Let's try our best here, without changing too much and risking further breakage.
- Loading branch information