Skip to content

Commit eb40852

Browse files
committed
chore: unuseful if
1 parent c56931f commit eb40852

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

standalone.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ function StandaloneSerializer (options = { readMode: true }) {
2323
// WRITE MODE: it behalf on the default SerializerSelector, wrapping the API to run the Ajv Standalone code generation
2424
const factory = SerializerSelector()
2525
return function wrapper (externalSchemas, serializerOpts = {}) {
26-
if (!serializerOpts.mode || serializerOpts.mode !== 'standalone') {
27-
// to generate the serialization source code, these options are mandatory
28-
serializerOpts.mode = 'standalone'
29-
}
26+
// to generate the serialization source code, this option is mandatory
27+
serializerOpts.mode = 'standalone'
3028

3129
const compiler = factory(externalSchemas, serializerOpts)
3230
return function (opts) { // { schema/*, method, url, httpPart */ }

0 commit comments

Comments
 (0)