Skip to content

Commit 185235f

Browse files
committed
Config object: updates following API changes
Follow changes from readthedocs/readthedocs.org#10216
1 parent 9a9e2ab commit 185235f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/analytics.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export function injectAnalytics(config) {
6262
cookie_expires: 0, // Session cookie (non-persistent)
6363
dimension1: config.project.slug,
6464
dimension2: config.version.slug,
65-
dimension3: config.project.language,
66-
dimension5: config.project.programming_language,
65+
dimension3: config.project.language.code,
66+
dimension5: config.project.programming_language.code,
6767
groups: "rtfd",
6868
});
6969

src/external-version-warning.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function injectExternalVersionWarning(config) {
77
// This way, we allow customization of the look&feel without compromising the logic.
88
if (
99
!config.features.external_version_warning.enabled ||
10-
!config.version.external
10+
!config.version.type !== "external"
1111
) {
1212
return false;
1313
}
@@ -20,7 +20,7 @@ export function injectExternalVersionWarning(config) {
2020
This page
2121
<a class="reference external" href="${window.location.protocol}//${config.domains.dashboard}/projects/${config.project.slug}/builds/${config.build.id}/">was created </a>
2222
from a pull request
23-
(<a class="reference external" href="${config.project.repository_url}/pull/${config.version.slug}">#${config.version.slug}</a>).
23+
(<a class="reference external" href="${config.project.repository.url}/pull/${config.version.slug}">#${config.version.slug}</a>).
2424
</p>
2525
</div>
2626
`;

0 commit comments

Comments
 (0)