Browse Source

changed the way to check if there are matches

Dustin Utecht 5 years ago
parent
commit
5f6326076e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/check-api.js

+ 1 - 1
tools/check-api.js

@@ -58,7 +58,7 @@ class API {
           const tmpDetails = details[i + 1].trim()
           if (name === 'Example' && exampleFilesFound) {
             const matches = exampleRegex.exec(tmpDetails)
-            if (matches === null) {
+            if (!matches) {
               errors.push(chalk.red(`[${key}] missing or wrong formatted example`, `"${tmpDetails}"`))
               continue
             }