mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 18:11:47 +08:00
Use start-of-string matching to avoid ambiguity between preact and react
This commit is contained in:
parent
06315ddaf2
commit
01c0eed0b8
@ -26,12 +26,13 @@ export const reproNext = async ({
|
||||
branch,
|
||||
init,
|
||||
}: ReproOptions) => {
|
||||
const filterRegex = new RegExp(`^${filterValue || ''}`, 'i');
|
||||
|
||||
const keys = Object.keys(TEMPLATES) as Choice[];
|
||||
// get value from template and reduce through TEMPLATES to filter out the correct template
|
||||
const choices = keys.reduce<Choice[]>((acc, group) => {
|
||||
const current = TEMPLATES[group];
|
||||
|
||||
const filterRegex = new RegExp(filterValue, 'i');
|
||||
if (!filterValue) {
|
||||
acc.push(group);
|
||||
return acc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user