From 9881942252b1ff248ae06c7631cbb63a696da4b5 Mon Sep 17 00:00:00 2001 From: Robin Stevens Date: Tue, 19 May 2026 10:25:54 +0200 Subject: [PATCH] Document the null case for the replace rules in the debugging module --- dev-docs/modules/debugging.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev-docs/modules/debugging.md b/dev-docs/modules/debugging.md index d48c921634..b62a6817b2 100644 --- a/dev-docs/modules/debugging.md +++ b/dev-docs/modules/debugging.md @@ -114,7 +114,9 @@ To illustrate, these definitions are equivalent: ### Replace rules -The replace rule can be provided as a function that takes the bid request as its only argument and returns an object with the desired response properties. The [first example above](#example) could be written as: +The replace rule can be provided as a function that takes the bid request as its only argument and returns an object with the desired response properties. +The function can also return `null` to indicate that there is no bid. +The [first example above](#example) could be written as: ```javascript pbjs.setConfig({ @@ -137,6 +139,8 @@ Alternatively, the rule can be expressed as an object, and its `key`-`value` pai - if `value` is a function, then `bidResponse[key]` will be set to `value(bidRequest)`; - otherwise, `bidResponse[key]` will be set to `value`. +Using `null` as the object indicates that there was no bid. + To illustrate, the following definitions are equivalent: ```javascript