fix(conference): ensure avatar url and email changes act on strings
Both conference.changeLocalEmail and conference.changeLocalAvatarUrl are exposed in the external api. It is possible for users to then pass in non-string values. To make it more visibly obvious of the error and to prevent script errors, convert whatever is passed in into a string.
This commit is contained in:
parent
2e08815644
commit
0451e7c9e7
|
@ -2051,7 +2051,7 @@ export default {
|
|||
* @param email {string} the new email
|
||||
*/
|
||||
changeLocalEmail(email = '') {
|
||||
email = email.trim();
|
||||
email = String(email).trim();
|
||||
|
||||
if (email === APP.settings.getEmail()) {
|
||||
return;
|
||||
|
@ -2075,7 +2075,7 @@ export default {
|
|||
* @param url {string} the new url
|
||||
*/
|
||||
changeLocalAvatarUrl(url = '') {
|
||||
url = url.trim();
|
||||
url = String(url).trim();
|
||||
|
||||
if (url === APP.settings.getAvatarUrl()) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue