refactor: Incorrect spelling in hooks error message (#8585)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user