Skip to content

Commit 5a624c2

Browse files
clean
1 parent 0aee843 commit 5a624c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/openops/src/lib/ai/sync-models.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ async function fetchAiSdkModels(
138138

139139
const dts = await response.text();
140140
const pattern = new RegExp(
141-
`type\\s+${source.typeName}\\s*=\\s*([^;]+);`,
141+
String.raw`type\s+${source.typeName}\s*=\s*([^;]+);`,
142142
's',
143143
);
144-
const match = dts.match(pattern);
144+
const match = pattern.exec(dts);
145145
if (!match) {
146146
throw new Error(`Could not find type ${source.typeName} in @ai-sdk/${pkg}`);
147147
}

0 commit comments

Comments
 (0)