From bfd6e00506a6ecace8cbb8f0065160d7f5cb2291 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 27 May 2024 10:38:29 +0300 Subject: [PATCH] [docs] Fix `@mui/material` version used in sandboxes --- docs/pages/_app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/pages/_app.js b/docs/pages/_app.js index 157054c66ca4..69982b1a9e72 100644 --- a/docs/pages/_app.js +++ b/docs/pages/_app.js @@ -41,7 +41,10 @@ ponyfillGlobal.muiDocConfig = { csbIncludePeerDependencies: (deps, { versions }) => { const newDeps = { ...deps }; - newDeps['@mui/material'] = versions['@mui/material']; + // #default-branch-switch + // Check which version of `@mui/material` should be resolved when opening docs examples in StackBlitz or CodeSandbox + newDeps['@mui/material'] = + versions['@mui/material'] !== 'next' ? versions['@mui/material'] : 'latest'; if (newDeps['@mui/x-data-grid-generator']) { newDeps['@mui/icons-material'] = versions['@mui/icons-material'];