Fix pretier

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
Gregoire Parant 2021-12-23 15:06:32 +01:00
parent 96d46e96c2
commit efa57d2754
6 changed files with 64 additions and 61 deletions

View file

@ -62,10 +62,10 @@ class UrlManager {
get isActiveLimitRoom(): boolean {
const match = /\*\/(\w+)\/(?:\w+)/.exec(window.location.pathname.toString());
const timestamp = match ? Number.parseInt(match[1]) : null;
if(!timestamp){
if (!timestamp) {
return false;
}
return ((new Date()).getTime() - 48*60*60*1000) < timestamp;
return new Date().getTime() - 48 * 60 * 60 * 1000 < timestamp;
}
}