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
+3
View File
@@ -7547,12 +7547,15 @@ import gameLogService from './service/gamelog.js'
}; };
$app.methods.compareCurrentVRCPlusIcon = function (userIcon) { $app.methods.compareCurrentVRCPlusIcon = function (userIcon) {
try {
var url = new URL(API.currentUser.userIcon); var url = new URL(API.currentUser.userIcon);
var pathArray = url.pathname.split('/'); var pathArray = url.pathname.split('/');
var currentUserIcon = pathArray[4]; var currentUserIcon = pathArray[4];
if (userIcon === currentUserIcon) { if (userIcon === currentUserIcon) {
return true; return true;
} }
} catch (err) {
}
return false; return false;
}; };