@pronto-tools-and-more/custom-js-functions 12.49.0 → 12.50.0
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/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/parts/ReadTime/ReadTime.ts +1 -1
package/dist/main.js
CHANGED
@@ -509,7 +509,7 @@
|
|
509
509
|
var getReadTime = (content) => {
|
510
510
|
const parsedSeo = JSON.parse(content?.properties?.purple_seo_meta);
|
511
511
|
const readTimeNumber = parsedSeo?.est_reading_time_minutes;
|
512
|
-
if (readTimeNumber) {
|
512
|
+
if (typeof readTimeNumber === "number") {
|
513
513
|
return `${readTimeNumber} min`;
|
514
514
|
}
|
515
515
|
const readTime = parsedSeo?.twitter_misc?.["Est. reading time"] || "n/a";
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
export const getReadTime = (content: any) => {
|
2
2
|
const parsedSeo = JSON.parse(content?.properties?.purple_seo_meta);
|
3
3
|
const readTimeNumber = parsedSeo?.est_reading_time_minutes;
|
4
|
-
if (readTimeNumber) {
|
4
|
+
if (typeof readTimeNumber === "number") {
|
5
5
|
return `${readTimeNumber} min`;
|
6
6
|
}
|
7
7
|
const readTime = parsedSeo?.twitter_misc?.["Est. reading time"] || "n/a";
|