1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 10:38:30 +00:00

3.5.327. component:chat/chat-room-manager cometh.

This commit is contained in:
SirStendec 2016-10-12 20:54:09 -04:00
parent 6ab4bd64a8
commit 4e2c2f5056
7 changed files with 62 additions and 49 deletions

View file

@ -66,13 +66,13 @@ var FFZ = window.FrankerFaceZ,
FFZ.SRC_IDS = {},
FFZ.src_to_id = function(src) {
if ( FFZ.SRC_IDS.hasOwnProperty(src) )
if ( Object.hasOwnProperty.call(FFZ.SRC_IDS, src) )
return FFZ.SRC_IDS[src];
var match = /\/emoticons\/v1\/(\d+)\/1\.0/.exec(src),
id = match ? parseInt(match[1]) : null;
if ( Number.isNaN(id) )
if ( typeof id === "number" && (isNaN(id) || !isFinite(id)) )
id = null;
FFZ.SRC_IDS[src] = id;