mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
fix to do num-based comparison
This commit is contained in:
parent
c8f22f5fb1
commit
5cd4b31648
1 changed files with 3 additions and 5 deletions
|
@ -11,11 +11,10 @@ function ccallString(proc, closure, str) {
|
|||
function registerOnce(devid, gitrev, now) {
|
||||
let nextTimeKey = 'next_reg';
|
||||
let gitKey = 'last_write';
|
||||
let nextTime = localStorage.getItem(nextTimeKey);
|
||||
let nextTime = parseInt(localStorage.getItem(nextTimeKey));
|
||||
let prevGit = localStorage.getItem(gitKey);
|
||||
// false: for now, always register. PENDING
|
||||
if ( false && prevGit == gitrev && now < nextTime ) {
|
||||
// console.log("registerOnce: skipping");
|
||||
if ( prevGit == gitrev && now < nextTime ) {
|
||||
console.log('registerOnce(): next in ' + (nextTime - now) + ' secs');
|
||||
} else {
|
||||
let args = { devid: devid,
|
||||
gitrev: gitrev,
|
||||
|
@ -27,7 +26,6 @@ function registerOnce(devid, gitrev, now) {
|
|||
vrntName: 'wasm',
|
||||
};
|
||||
let body = JSON.stringify(args);
|
||||
// console.log('registerOnce(): args: ' + body);
|
||||
|
||||
fetch('/xw4/api/v1/register', {
|
||||
method: 'post',
|
||||
|
|
Loading…
Reference in a new issue