@atlaskit/editor-card-provider 6.4.12 → 6.4.13

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-card-provider
2
2
 
3
+ ## 6.4.13
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 6.4.12
4
10
 
5
11
  ### Patch Changes
@@ -186,7 +186,14 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function (_re
186
186
  });
187
187
  }
188
188
 
189
- // fetch the latest data async and update the cache
189
+ // if parent class NodeDataProvider has cached the network request for the node
190
+ // we can skip fetching the data async and updating the session storage cache
191
+ var cacheStatus = this.getCacheStatusForNode(jsonNode);
192
+ if (cacheStatus === 'network') {
193
+ return;
194
+ }
195
+
196
+ // fetch the latest data async and update the session storage cache
190
197
  this.getDataAsync(node, function (payload) {
191
198
  if (payload.data && !payload.error) {
192
199
  _this2.smartCardLocalCacheClient.setItem(key, payload.data);
@@ -108,7 +108,14 @@ export class EditorCardProvider extends NodeDataProvider {
108
108
  });
109
109
  }
110
110
 
111
- // fetch the latest data async and update the cache
111
+ // if parent class NodeDataProvider has cached the network request for the node
112
+ // we can skip fetching the data async and updating the session storage cache
113
+ const cacheStatus = this.getCacheStatusForNode(jsonNode);
114
+ if (cacheStatus === 'network') {
115
+ return;
116
+ }
117
+
118
+ // fetch the latest data async and update the session storage cache
112
119
  this.getDataAsync(node, payload => {
113
120
  if (payload.data && !payload.error) {
114
121
  this.smartCardLocalCacheClient.setItem(key, payload.data);
@@ -181,7 +181,14 @@ export var EditorCardProvider = /*#__PURE__*/function (_ref) {
181
181
  });
182
182
  }
183
183
 
184
- // fetch the latest data async and update the cache
184
+ // if parent class NodeDataProvider has cached the network request for the node
185
+ // we can skip fetching the data async and updating the session storage cache
186
+ var cacheStatus = this.getCacheStatusForNode(jsonNode);
187
+ if (cacheStatus === 'network') {
188
+ return;
189
+ }
190
+
191
+ // fetch the latest data async and update the session storage cache
185
192
  this.getDataAsync(node, function (payload) {
186
193
  if (payload.data && !payload.error) {
187
194
  _this2.smartCardLocalCacheClient.setItem(key, payload.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-card-provider",
3
- "version": "6.4.12",
3
+ "version": "6.4.13",
4
4
  "description": "Contains the EditorCardProvider, for determining smart card behaviour in the editor.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/linking-types": "^14.2.0",
40
40
  "@atlaskit/node-data-provider": "^8.3.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^32.0.0",
42
+ "@atlaskit/tmp-editor-statsig": "^33.0.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "dataloader": "^2.1.0"
45
45
  },