Browse Source

Merge pull request #15617 from abpframework/fix/default-param

wrap defaultValue with quotes when type is string
pull/15655/head
Mahmut Gundogdu 3 years ago
committed by GitHub
parent
commit
587258c2d5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      npm/ng-packs/packages/schematics/src/models/model.ts

8
npm/ng-packs/packages/schematics/src/models/model.ts

@ -45,9 +45,13 @@ abstract class TypeRef {
get default() {
return this._default;
}
set default(value: string) {
set default(value: any) {
if (!value) return;
this._default = ` = ${value}`;
if (typeof value === 'string') {
this._default = ` = "${value}"`;
} else {
this._default = ` = ${value}`;
}
}
constructor(options: TypeRefOptions) {

Loading…
Cancel
Save