Skip to content

Commit 5eb690c

Browse files
authored
refactor: Incorrect spelling in hooks error message (#8585)
1 parent a37d1ee commit 5eb690c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/ParseHooks.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ describe('Hooks', () => {
208208
expect(err).not.toBe(null);
209209
if (err) {
210210
expect(err.code).toBe(143);
211-
expect(err.message).toBe('function name: my_new_function already exits');
211+
expect(err.message).toBe('function name: my_new_function already exists');
212212
}
213213
return Parse.Hooks.removeFunction('my_new_function');
214214
}

src/Controllers/HooksController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class HooksController {
144144
if (aHook.functionName) {
145145
return this.getFunction(aHook.functionName).then(result => {
146146
if (result) {
147-
throw new Parse.Error(143, `function name: ${aHook.functionName} already exits`);
147+
throw new Parse.Error(143, `function name: ${aHook.functionName} already exists`);
148148
} else {
149149
return this.createOrUpdateHook(aHook);
150150
}

0 commit comments

Comments
 (0)