testomatio-editor-blocks 0.4.12 → 0.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.
|
@@ -65,7 +65,7 @@ function normalizeSnippetSuggestions(snippets) {
|
|
|
65
65
|
return parseSnippetsFromJsonApi(snippets);
|
|
66
66
|
}
|
|
67
67
|
function normalizeJsonApiResource(resource) {
|
|
68
|
-
var _a, _b, _c;
|
|
68
|
+
var _a, _b, _c, _d;
|
|
69
69
|
if (!resource)
|
|
70
70
|
return null;
|
|
71
71
|
const attrs = resource.attributes;
|
|
@@ -76,8 +76,8 @@ function normalizeJsonApiResource(resource) {
|
|
|
76
76
|
return {
|
|
77
77
|
id: String(id),
|
|
78
78
|
title: String(title),
|
|
79
|
-
body: (_b = attrs === null || attrs === void 0 ? void 0 : attrs.body) !== null && _b !== void 0 ? _b : null,
|
|
80
|
-
description: (
|
|
79
|
+
body: (_c = (_b = attrs === null || attrs === void 0 ? void 0 : attrs.body) !== null && _b !== void 0 ? _b : attrs === null || attrs === void 0 ? void 0 : attrs.description) !== null && _c !== void 0 ? _c : null,
|
|
80
|
+
description: (_d = attrs === null || attrs === void 0 ? void 0 : attrs.description) !== null && _d !== void 0 ? _d : null,
|
|
81
81
|
usageCount: coerceNumber(attrs === null || attrs === void 0 ? void 0 : attrs["usage-count"]),
|
|
82
82
|
isSnippet: true,
|
|
83
83
|
};
|
package/package.json
CHANGED
|
@@ -115,7 +115,7 @@ function normalizeJsonApiResource(resource: SnippetJsonApiResource | null | unde
|
|
|
115
115
|
return {
|
|
116
116
|
id: String(id),
|
|
117
117
|
title: String(title),
|
|
118
|
-
body: attrs?.body ?? null,
|
|
118
|
+
body: attrs?.body ?? attrs?.description ?? null,
|
|
119
119
|
description: attrs?.description ?? null,
|
|
120
120
|
usageCount: coerceNumber(attrs?.["usage-count"]),
|
|
121
121
|
isSnippet: true,
|