We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As you can see in the screenshot below, there is 'null' and unnecessary ';' characters appears when the addAddress method's args has null values.
like this ⬇
.addAddress( 'name', 'extended', null, 'worktown', 'state', undefined, 'Belgium', )
So i've fixed this issue by pushing all parameters to an array and then filter good values among them and join them to one string with ';'.
public addAddress( name: string = '', extended: string = '', street: string = '', city: string = '', region: string = '', zip: string = '', country: string = '', type: string = 'WORK;POSTAL', ): this { const value = [name, extended, street, city, region, zip, country] .filter((part) => part !== null && part !== '') .join(';') if (value === '') return this this.setProperty( 'address', `ADR${type !== '' ? `;${type}` : ''}${this.getCharsetString()}`, value, ) return this }
Hope this will helpfull for someone
The text was updated successfully, but these errors were encountered:
Fix issue that unnecessary semicolons being added to the address of t…
4abea15
…he vcf when the addAddress method parameters has empty or null (joaocarmo#60)
477bb2d
6139892
…he vcf when the addAddress method parameters has empty or null joaocarmo#60
1f43027
No branches or pull requests
As you can see in the screenshot below, there is 'null' and unnecessary ';' characters appears when the addAddress method's args has null values.
like this ⬇
So i've fixed this issue by pushing all parameters to an array and then filter good values among them and join them to one string with ';'.
Hope this will helpfull for someone
The text was updated successfully, but these errors were encountered: