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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
2 deletions
-
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) { |
|
|
|
|