bugfix
This commit is contained in:
parent
dfc79a1057
commit
f2135c579f
@ -47,13 +47,15 @@ dispatch_event:
|
|||||||
params:
|
params:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bricks.uuid = window.crypto.randomUUID;
|
bricks.uuid = function(){
|
||||||
|
return crypto.randomUUID();
|
||||||
|
}
|
||||||
|
|
||||||
bricks.deviceid = function(appname){
|
bricks.deviceid = function(appname){
|
||||||
var deviceid = appname + 'deviceid';
|
var deviceid = appname + 'deviceid';
|
||||||
var id = localStorage.getItem(deviceid);
|
var id = localStorage.getItem(deviceid);
|
||||||
if (!id){
|
if (!id){
|
||||||
id = bricks.uuid();
|
id = crypto.randomUUID();
|
||||||
localStorage.setItem(deviceid, id);
|
localStorage.setItem(deviceid, id);
|
||||||
}
|
}
|
||||||
return id;
|
return id;
|
||||||
|
Loading…
Reference in New Issue
Block a user