Skip to content

Commit

Permalink
fix error message in not name confliction case
Browse files Browse the repository at this point in the history
  • Loading branch information
ailisp committed Mar 1, 2023
1 parent c15cb3e commit 787ede9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/near-sdk-js/lib/cli/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/near-sdk-js/src/cli/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function executeCommand(
signale.error(`Command failed: ${command}`);

const failDueToNameConflict = stderr.match(/conflicting types for '([a-zA-Z0-9_]+)'/);
if (failDueToNameConflict.length > 1) {
if (failDueToNameConflict && failDueToNameConflict.length > 1) {
signale.error(`'${failDueToNameConflict[1]}' is a reserved word, please use another name for contract method"`);
}
}
Expand Down

0 comments on commit 787ede9

Please sign in to comment.