Skip to content

Commit 6aae40c

Browse files
committed
Fix: nodenext resolution fastify#198
1 parent e7ba0b9 commit 6aae40c

File tree

3 files changed

+163
-153
lines changed

3 files changed

+163
-153
lines changed

src/ObjectSchema.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ const ObjectSchema = ({ schema = initialState, ...options } = {}) => {
4545
* @param {string} id - an #id
4646
**/
4747
id: id => {
48-
if (!id)
48+
if (!id) {
4949
throw new FluentSchemaError(
50-
`id should not be an empty fragment <#> or an empty string <> (e.g. #myId)`
50+
'id should not be an empty fragment <#> or an empty string <> (e.g. #myId)'
5151
)
52+
}
5253
return options.factory({ schema: { ...schema, $id: id }, ...options })
5354
},
5455
/**

src/ObjectSchema.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ describe('ObjectSchema', () => {
229229
.valueOf()
230230
).toEqual({
231231
$id: id,
232-
properties: {'prop': {}},
232+
properties: { prop: {} },
233233
type: 'object'
234234
})
235235
})

0 commit comments

Comments
 (0)