Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Nov 17, 2020
1 parent 3c34e7f commit c1c3e6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions spec/dynamicDefaults.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import {v4 as uuidv4} from "uuid"
const should = chai.should()

describe('keyword "dynamicDefaults"', () => {
// function getAjv() {
// return new Ajv({useDefaults: true, unknownFormats: true})
// }

const ajvs = getAjvInstances("dynamicDefaults", dynamicDefaultsDef, dynamicDefaults, {
useDefaults: true,
formats: fullFormats,
Expand Down
4 changes: 2 additions & 2 deletions src/definitions/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export default function getDef(): CodeKeywordDefinition {
const t = ts.pop() as string
if (!(t in transform)) throw new Error(`transform: unknown transformation ${t}`)
const func = gen.scopeValue("func", {ref: transform[t as TransformName]})
const inner = transformExpr(ts)
return cfg && t === "toEnumCase" ? _`${func}(${inner}, ${cfg})` : _`${func}(${inner})`
const arg = transformExpr(ts)
return cfg && t === "toEnumCase" ? _`${func}(${arg}, ${cfg})` : _`${func}(${arg})`
}
},
metaSchema: {
Expand Down

0 comments on commit c1c3e6e

Please sign in to comment.