Skip to content

Commit 1251da3

Browse files
author
Dobbias Nan
committed
fixed typo
1 parent 0bade56 commit 1251da3

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/Controllers/SchemaController.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const volatileClasses = Object.freeze([
176176
const userIdRegex = /^[a-zA-Z0-9]{10}$/;
177177
// Anything that start with role
178178
const roleRegex = /^role:.*/;
179-
// Anything that start with readUserFields
179+
// Anything that starts with readUserFields
180180
const pointerPermissionRegex = /^readUserFields:.*/;
181181
// * permission
182182
const publicRegex = /^\*$/;
@@ -908,10 +908,15 @@ export default class SchemaController {
908908
let defaultValueType = getType(fieldType.defaultValue);
909909
if (typeof defaultValueType === 'string') {
910910
defaultValueType = { type: defaultValueType };
911-
} else if (typeof defaultValueType === 'object' && fieldType.type === 'Relation') {
911+
} else if (
912+
typeof defaultValueType === 'object' &&
913+
fieldType.type === 'Relation'
914+
) {
912915
return {
913916
code: Parse.Error.INCORRECT_TYPE,
914-
error: `The 'default value' option is not applicable for ${typeToString(fieldType)}`
917+
error: `The 'default value' option is not applicable for ${typeToString(
918+
fieldType
919+
)}`,
915920
};
916921
}
917922
if (!dbTypeMatchesObjectType(fieldType, defaultValueType)) {
@@ -926,7 +931,9 @@ export default class SchemaController {
926931
if (typeof fieldType === 'object' && fieldType.type === 'Relation') {
927932
return {
928933
code: Parse.Error.INCORRECT_TYPE,
929-
error: `The 'required' option is not applicable for ${typeToString(fieldType)}`
934+
error: `The 'required' option is not applicable for ${typeToString(
935+
fieldType
936+
)}`,
930937
};
931938
}
932939
}

0 commit comments

Comments
 (0)