From 13cd6305d63080ff41e56534bfb5584f1bd7a135 Mon Sep 17 00:00:00 2001 From: JOU Amjs Date: Sat, 28 Dec 2024 08:37:59 +0800 Subject: [PATCH] docs: fix document error --- docs/tutorial/03-client/02-in-depth/02-method-matcher.md | 4 ++-- .../tutorial/03-client/02-in-depth/02-method-matcher.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tutorial/03-client/02-in-depth/02-method-matcher.md b/docs/tutorial/03-client/02-in-depth/02-method-matcher.md index 7dab938648..21d21198cc 100644 --- a/docs/tutorial/03-client/02-in-depth/02-method-matcher.md +++ b/docs/tutorial/03-client/02-in-depth/02-method-matcher.md @@ -64,10 +64,10 @@ const matchedMethods = alova.snaptshots.match({ ## Match a single method instance -You can also set the second function of the `match` function to `true` to return the first item of the matching result, and return `undefined` if no match is found. +You can also set the second function of the `match` function to `false` to return the first item of the matching result, and return `undefined` if no match is found. ```js -const matchedSingleMethod = alova.snaptshots.match(/^todo/, true); +const matchedSingleMethod = alova.snaptshots.match(/^todo/, false); ``` ## Limit instance snapshots diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tutorial/03-client/02-in-depth/02-method-matcher.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tutorial/03-client/02-in-depth/02-method-matcher.md index a4496d45d0..138eabbec0 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tutorial/03-client/02-in-depth/02-method-matcher.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tutorial/03-client/02-in-depth/02-method-matcher.md @@ -64,10 +64,10 @@ const matchedMethods = alova.snaptshots.match({ ## 匹配单个 method 实例 -你还可以将`match`函数的第二个函数设置为`true`返回匹配结果的第一项,未匹配到时返回`undefined`。 +你还可以将`match`函数的第二个函数设置为`false`返回匹配结果的第一项,未匹配到时返回`undefined`。 ```js -const matchedSingleMethod = alova.snaptshots.match(/^todo/, true); +const matchedSingleMethod = alova.snaptshots.match(/^todo/, false); ``` ## 限制实例快照