Prerequisites
Describe the issue
When using data-bs-content="true" (or "false") on an element with data-bs-toggle="popover", Bootstrap internally converts the string "true" to the boolean true, causing _typeCheckConfig to throw:
TypeError: POPOVER: Option "content" provided type "boolean" but expected type "(null|string|element|function)".
This prevents users from displaying the literal string "true" or "false" — a common and valid use case (e.g., showing boolean-like values in tables, configs, JSON previews).
Reduced test cases
-
Add this HTML:
<button type="button" class="btn btn-secondary" data-bs-toggle="popover" data-bs-content="true"> Show "true" </button>
-
Initialize popovers (e.g., via new bootstrap.Popover() or auto-init via data-bs-toggle).
-
Observe console error:
TypeError: POPOVER: Option "content" provided type "boolean" but expected type "(null|string|element|function)".
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
v5.2.1