Skip to content

Commit 91f7811

Browse files
committed
fix(playground): allow playground swapping with default framework set
1 parent 75c1dc0 commit 91f7811

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/global/Playground/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,15 @@ export default function Playground({
444444

445445
/**
446446
* Load the stored mode and/or usage target, if present
447-
* from previously being toggled.
447+
* from previously being toggled. Skip the usage target
448+
* reset when defaultFramework is set, since the initial
449+
* value is already correct and user tab clicks should
450+
* be preserved.
448451
*/
449452
setIonicMode(getDefaultMode());
450-
setUsageTarget(getDefaultUsageTarget());
453+
if (!defaultFramework) {
454+
setUsageTarget(getDefaultUsageTarget());
455+
}
451456

452457
/**
453458
* If the iframes weren't already loaded, load them now.

0 commit comments

Comments
 (0)