Repository: storybook
Issue: [Bug]: Documentation Pages in Safari 17.0 (19616.1.27.211.1)
Labels: bug,documentation

### Describe the bug

Some documentation pages load but then become blank <1s after loading

This happens on Safari 17.0 (19616.1.27.211.1), macOS 14.0 (23A344)
Example page: https://storybook.js.org/docs/6.5/writing-stories/build-pages-with-storybook


### To Reproduce

Load a page: https://storybook.js.org/docs/6.5/writing-stories/build-pages-with-storybook 

### System

_No response_

### Additional context

Console log during bug:
```
[Error] TypeError: null is not an object (evaluating 't.match(/\.((?:\w+-*)+)\.mdx$/)[1]') — https://release-6-5--storybook-frontpage.netlify.a…cs-screen-docs-screen-tsx-36581a59db83bf0699e0.js:0
	du (framework-660ea76ce3345336ed06.js:2:72424)
	(anonymous function) (framework-660ea76ce3345336ed06.js:2:72938)
	Ua (framework-660ea76ce3345336ed06.js:2:54211)
	ki (framework-660ea76ce3345336ed06.js:2:101715)
	bi (framework-660ea76ce3345336ed06.js:2:101285)
	yi (framework-660ea76ce3345336ed06.js:2:100823)
	(anonymous function) (framework-660ea76ce3345336ed06.js:2:112607)
	ws (framework-660ea76ce3345336ed06.js:2:113116)
	ls (framework-660ea76ce3345336ed06.js:2:105615)
	S (framework-660ea76ce3345336ed06.js:2:138146)
	T (framework-660ea76ce3345336ed06.js:2:138678)
[Error] Error: Minified React error #423; visit https://reactjs.org/docs/error-decoder.html?invariant=423 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
	reportError (framework-660ea76ce3345336ed06.js:2:122125)
	(anonymous function) (framework-660ea76ce3345336ed06.js:2:112945)
	ws (framework-660ea76ce3345336ed06.js:2:113116)
	ls (framework-660ea76ce3345336ed06.js:2:105615)
	S (framework-660ea76ce3345336ed06.js:2:138146)
	T (framework-660ea76ce3345336ed06.js:2:138678)
[Error] TypeError: null is not an object (evaluating 't.match(/\.((?:\w+-*)+)\.mdx$/)[1]') — https://release-6-5--storybook-frontpage.netlify.a…cs-screen-docs-screen-tsx-36581a59db83bf0699e0.js:0
	du (framework-660ea76ce3345336ed06.js:2:72424)
	(anonymous function) (framework-660ea76ce3345336ed06.js:2:72649)
	Ua (framework-660ea76ce3345336ed06.js:2:54211)
	ki (framework-660ea76ce3345336ed06.js:2:101850)
	bi (framework-660ea76ce3345336ed06.js:2:101285)
	yi (framework-660ea76ce3345336ed06.js:2:100823)
	(anonymous function) (framework-660ea76ce3345336ed06.js:2:112607)
	ws (framework-660ea76ce3345336ed06.js:2:113116)
	is (framework-660ea76ce3345336ed06.js:2:106874)
	jl (framework-660ea76ce3345336ed06.js:2:47616)
	(anonymous function) (framework-660ea76ce3345336ed06.js:2:113113)
	ws (framework-660ea76ce3345336ed06.js:2:113116)
	ls (framework-660ea76ce3345336ed06.js:2:105615)
	S (framework-660ea76ce3345336ed06.js:2:138146)
	T (framework-660ea76ce3345336ed06.js:2:138678)
[Error] TypeError: null is not an object (evaluating 't.match(/\.((?:\w+-*)+)\.mdx$/)[1]')
	jl (framework-660ea76ce3345336ed06.js:2:47707)
	(anonymous function) (framework-660ea76ce3345336ed06.js:2:113113)
	ws (framework-660ea76ce3345336ed06.js:2:113116)
	ls (framework-660ea76ce3345336ed06.js:2:105615)
	S (framework-660ea76ce3345336ed06.js:2:138146)
	T (framework-660ea76ce3345336ed06.js:2:138678)
```