Skip to content

Commit

Permalink
Merge pull request #1578 from kerryChen95/master
Browse files Browse the repository at this point in the history
ref function can return string
  • Loading branch information
kamilmysliwiec committed Oct 31, 2022
2 parents 767c9da + e970aa4 commit cd646d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/factories/definitions.factory.ts
Expand Up @@ -94,8 +94,8 @@ export class DefinitionsFactory {
}
if (typeof optionsOrType?.ref === 'function') {
try {
optionsOrType.ref =
(optionsOrType.ref as Function)()?.name ?? optionsOrType.ref;
const result = (optionsOrType.ref as Function)();
optionsOrType.ref = result?.name ?? result;
} catch (err) {
if (err instanceof TypeError) {
const refClassName = (optionsOrType.ref as Function)?.name;
Expand Down

0 comments on commit cd646d5

Please sign in to comment.