@blueking/monitor-apm-log 2.3.16 → 2.3.18

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.
Files changed (2) hide show
  1. package/main.js +16 -8
  2. package/package.json +1 -1
package/main.js CHANGED
@@ -54486,7 +54486,11 @@ class RetrieveHelper extends base {
54486
54486
  let memoryObj = {};
54487
54487
  const storageStr = localStorage.getItem('MONITOR_LOG_RECENT_INDEX_SET_ID');
54488
54488
  if (storageStr) {
54489
- memoryObj = JSON.parse(storageStr);
54489
+ // 兼容旧的代码,后期可以去除
54490
+ const parseValue = JSON.parse(storageStr);
54491
+ if (!Array.isArray(parseValue)) {
54492
+ memoryObj = parseValue;
54493
+ }
54490
54494
  }
54491
54495
  Object.assign(memoryObj, {
54492
54496
  [bizAppKey]: idList
@@ -222049,13 +222053,17 @@ var sub_bar_component = normalizeComponent(
222049
222053
  const memoryStr = localStorage.getItem('MONITOR_LOG_RECENT_INDEX_SET_ID');
222050
222054
  let defaultId = '';
222051
222055
  if (memoryStr) {
222052
- const memoryObj = JSON.parse(memoryStr);
222053
- const memoryIds = memoryObj[bizAppKey];
222054
- if (memoryIds) {
222055
- const memoryId = memoryIds[0];
222056
- const defaultValidItem = resp.find(item => item.index_set_id === memoryId && item.tags.every(tag => tag.tag_id !== 4));
222057
- if (defaultValidItem) {
222058
- defaultId = memoryId;
222056
+ const parseValue = JSON.parse(memoryStr);
222057
+ // 兼容旧的代码,后期可以去除
222058
+ if (!Array.isArray(parseValue)) {
222059
+ const memoryObj = parseValue;
222060
+ const memoryIds = memoryObj[bizAppKey];
222061
+ if (memoryIds) {
222062
+ const memoryId = memoryIds[0];
222063
+ const defaultValidItem = resp.find(item => item.index_set_id === memoryId && item.tags.every(tag => tag.tag_id !== 4));
222064
+ if (defaultValidItem) {
222065
+ defaultId = memoryId;
222066
+ }
222059
222067
  }
222060
222068
  }
222061
222069
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@blueking/monitor-apm-log","version":"2.3.16","description":"","main":"main.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"MIT"}
1
+ {"name":"@blueking/monitor-apm-log","version":"2.3.18","description":"","main":"main.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"MIT"}