Skip to content

Commit 1ccf193

Browse files
stsewdericholscher
authored andcommitted
Embedded js: fix no-sphinx docs
Page is available for sphinx projects only, jquery was interpreting a null value as no present, but now that we are using fetch/URLSearchParams this is being serialized as a literal `null`.
1 parent c6f141b commit 1ccf193

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

readthedocs/core/static-src/core/js/doc-embed/footer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ function init() {
4141
var get_data = {
4242
project: rtd['project'],
4343
version: rtd['version'],
44-
page: rtd['page'],
44+
// Page is a sphinx concept only,
45+
// avoid serializing this as a literal `null` instead of empty.
46+
page: rtd['page'] || "",
4547
theme: rtd.get_theme_name(),
4648
};
4749

0 commit comments

Comments
 (0)