Fix bug from no icon set

This commit is contained in:
Natsumi
2020-12-20 21:26:07 +13:00
committed by pypy
parent 5b665ee5c4
commit 9698638dfc
+8 -5
View File
@@ -7547,11 +7547,14 @@ import gameLogService from './service/gamelog.js'
}; };
$app.methods.compareCurrentVRCPlusIcon = function (userIcon) { $app.methods.compareCurrentVRCPlusIcon = function (userIcon) {
var url = new URL(API.currentUser.userIcon); try {
var pathArray = url.pathname.split('/'); var url = new URL(API.currentUser.userIcon);
var currentUserIcon = pathArray[4]; var pathArray = url.pathname.split('/');
if (userIcon === currentUserIcon) { var currentUserIcon = pathArray[4];
return true; if (userIcon === currentUserIcon) {
return true;
}
} catch (err) {
} }
return false; return false;
}; };