refactor: Incorrect spelling in hooks error message (#8585)

This commit is contained in:
Corey
2023-05-28 06:58:16 -04:00
committed by GitHub
parent a37d1ee244
commit 5eb690c1c5
2 changed files with 2 additions and 2 deletions

View File

@@ -208,7 +208,7 @@ describe('Hooks', () => {
expect(err).not.toBe(null);
if (err) {
expect(err.code).toBe(143);
expect(err.message).toBe('function name: my_new_function already exits');
expect(err.message).toBe('function name: my_new_function already exists');
}
return Parse.Hooks.removeFunction('my_new_function');
}

View File

@@ -144,7 +144,7 @@ export class HooksController {
if (aHook.functionName) {
return this.getFunction(aHook.functionName).then(result => {
if (result) {
throw new Parse.Error(143, `function name: ${aHook.functionName} already exits`);
throw new Parse.Error(143, `function name: ${aHook.functionName} already exists`);
} else {
return this.createOrUpdateHook(aHook);
}