@fast-china/utils 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13992,12 +13992,14 @@ var FastUtils = function(exports, vue) {
13992
13992
  deviceId: ""
13993
13993
  });
13994
13994
  const uuidRegExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
13995
- const makeIdentity = () => {
13996
- if (state.deviceId && uuidRegExp.test(state.deviceId)) {
13997
- Local.set(state.cacheKey, state.deviceId);
13995
+ const makeIdentity = (deviceID) => {
13996
+ deviceID ?? (deviceID = state.deviceId);
13997
+ if (deviceID && uuidRegExp.test(deviceID)) {
13998
+ Local.set(state.cacheKey, deviceID);
13999
+ state.deviceId = deviceID;
13998
14000
  return state.deviceId;
13999
14001
  }
14000
- let deviceID = Local.get(state.cacheKey);
14002
+ deviceID = Local.get(state.cacheKey);
14001
14003
  if (deviceID && uuidRegExp.test(deviceID)) {
14002
14004
  state.deviceId = deviceID;
14003
14005
  return deviceID;