Conversation
|
Minor update to example files |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ab88c8629
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| (adUnitArray || []).forEach((au) => { | ||
| const code = au && au.code; | ||
| if (!code) return; |
There was a problem hiding this comment.
Handle string ad unit codes in getTargetingData
The RTD core calls submodules with auction.adUnitCodes (an array of ad unit code strings), but this function assumes each entry is an object and reads au.code. With the real input shape, code is always undefined and the returned map stays empty, so DataMage keys never get attached through Prebid’s ad-unit targeting path.
Useful? React with 👍 / 👎.
| .then((resJson) => { | ||
| if (!resJson) return; |
There was a problem hiding this comment.
Reset cached targeting when the fetch yields no payload
On non-2xx (or other no-payload paths), the code returns without clearing lastTargeting, so a previous auction’s contextual values remain active and can be reused by getTargetingData in later auctions. This causes stale targeting to be sent when the endpoint is down or when page context changes but the latest request fails.
Useful? React with 👍 / 👎.
| import { submodule } from '../src/hook.js'; | ||
| import { logError, logWarn, generateUUID } from '../src/utils.js'; | ||
|
|
||
| // eslint-disable-next-line no-console |
There was a problem hiding this comment.
do not disable our linting
patmmccann
left a comment
There was a problem hiding this comment.
fix the linting and see the bot feedback; other feedback might come later
Type of change
Description of change