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:
Leonard Kim 2017-06-01 10:55:44 -07:00 committed by Дамян Минков
parent 2e08815644
commit 0451e7c9e7
1 changed files with 2 additions and 2 deletions

View File

@ -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;