Fail gracefully for fingerprint

This commit is contained in:
RunasSudo 2017-12-11 13:26:31 +10:30
parent 5740f33b7d
commit 2d3e474725
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -41,11 +41,16 @@
// String.prototype.join confuses fingerprintjs2 // String.prototype.join confuses fingerprintjs2
var strjoin = String.prototype.join; var strjoin = String.prototype.join;
String.prototype.join = undefined; String.prototype.join = undefined;
try {
new Fingerprint2().get(function(result, components) { new Fingerprint2().get(function(result, components) {
String.prototype.join = strjoin; String.prototype.join = strjoin;
booth.fingerprint = components; booth.fingerprint = components;
nextTemplate(); nextTemplate();
}); });
} catch (ex) {
console.error(ex);
nextTemplate();
}
} else { } else {
nextTemplate(); nextTemplate();
} }