Fix null pointer exception

This commit is contained in:
shinigami-eyes 2019-02-08 20:43:06 +01:00
parent a01f6576cf
commit 352334d668
1 changed files with 1 additions and 1 deletions

View File

@ -307,7 +307,7 @@ function getCurrentFacebookPageId() {
function getIdentifier(urlstr) { function getIdentifier(urlstr) {
try { try {
var k = getIdentifierInternal(urlstr); var k = getIdentifierInternal(urlstr);
if (k && k.indexOf('!') != -1) return null; if (!k || k.indexOf('!') != -1) return null;
return k.toLowerCase(); return k.toLowerCase();
} catch (e) { } catch (e) {
console.warn("Unable to get identifier for " + urlstr); console.warn("Unable to get identifier for " + urlstr);