Skip to content

Commit

Permalink
Update npm contents.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnspurlock-skymethod committed Feb 2, 2023
1 parent 9274ce6 commit 994cfcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions npm/threadcap/cjs/main.js
Expand Up @@ -1015,10 +1015,11 @@ function computeSummary(obj) {
return computeLanguageTaggedValues(obj, "summary", "summaryMap");
}
function computeLanguageTaggedValues(obj, stringProp, mapProp) {
var _a, _b;
if (obj.type === "PodcastEpisode" && isStringRecord(obj.description) && obj.description.type === "Note")
obj = obj.description;
const stringVal = obj[stringProp];
const mapVal = obj[mapProp];
const stringVal = (_a = obj[stringProp]) != null ? _a : void 0;
const mapVal = (_b = obj[mapProp]) != null ? _b : void 0;
if (stringVal !== void 0 && typeof stringVal !== "string")
throw new Error(`Expected '${stringProp}' to be a string, found ${JSON.stringify(stringVal)}`);
if (mapVal !== void 0 && !(isStringRecord(mapVal) && Object.values(mapVal).every((v) => typeof v === "string")))
Expand Down
5 changes: 3 additions & 2 deletions npm/threadcap/esm/main.js
Expand Up @@ -984,10 +984,11 @@ function computeSummary(obj) {
return computeLanguageTaggedValues(obj, "summary", "summaryMap");
}
function computeLanguageTaggedValues(obj, stringProp, mapProp) {
var _a, _b;
if (obj.type === "PodcastEpisode" && isStringRecord(obj.description) && obj.description.type === "Note")
obj = obj.description;
const stringVal = obj[stringProp];
const mapVal = obj[mapProp];
const stringVal = (_a = obj[stringProp]) != null ? _a : void 0;
const mapVal = (_b = obj[mapProp]) != null ? _b : void 0;
if (stringVal !== void 0 && typeof stringVal !== "string")
throw new Error(`Expected '${stringProp}' to be a string, found ${JSON.stringify(stringVal)}`);
if (mapVal !== void 0 && !(isStringRecord(mapVal) && Object.values(mapVal).every((v) => typeof v === "string")))
Expand Down

0 comments on commit 994cfcf

Please sign in to comment.