Skip to content

Commit 7347e05

Browse files
authored
Merge pull request #12069 from github/repo-sync
repo sync
2 parents cab8345 + fea62bc commit 7347e05

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

lib/page.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,18 +250,16 @@ class Page {
250250
})
251251
}
252252

253-
// set a flag so layout knows whether to render a mac/windows/linux switcher element
254-
this.includesPlatformSpecificContent =
255-
html.includes('extended-markdown mac') ||
256-
html.includes('extended-markdown windows') ||
257-
html.includes('extended-markdown linux')
258-
259253
this.detectedPlatforms = [
260-
html.includes('extended-markdown mac') && 'mac',
261-
html.includes('extended-markdown windows') && 'windows',
262-
html.includes('extended-markdown linux') && 'linux',
254+
(html.includes('extended-markdown mac') || html.includes('platform-mac')) && 'mac',
255+
(html.includes('extended-markdown windows') || html.includes('platform-windows')) &&
256+
'windows',
257+
(html.includes('extended-markdown linux') || html.includes('platform-linux')) && 'linux',
263258
].filter(Boolean)
264259

260+
// set a flag so layout knows whether to render a mac/windows/linux switcher element
261+
this.includesPlatformSpecificContent = this.detectedPlatforms.length > 0
262+
265263
return html
266264
}
267265

0 commit comments

Comments
 (0)