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
1 changed files with 9 additions and 4 deletions

View File

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