@quintype/seo 1.40.6-embed-url.3 → 1.40.6-embed-url.4
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/.vscode/settings.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -821,25 +821,23 @@ function generateLiveBlogPostingData(structuredData = {}, story = {}, publisherC
|
|
|
821
821
|
}
|
|
822
822
|
|
|
823
823
|
function getEmbedUrl(cards) {
|
|
824
|
-
|
|
824
|
+
let embedUrl = "";
|
|
825
825
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
826
|
+
// not using the return value of top level find
|
|
827
|
+
// coz we only need the embed url
|
|
828
|
+
// find is used for early exit
|
|
829
|
+
cards.find(card => {
|
|
829
830
|
const storyElements = card["story-elements"];
|
|
830
831
|
return storyElements.find((elem, index) => {
|
|
831
832
|
if (elem["embed-url"]) {
|
|
832
|
-
|
|
833
|
-
return
|
|
833
|
+
embedUrl = elem["embed-url"];
|
|
834
|
+
return true;
|
|
834
835
|
}
|
|
835
836
|
return false;
|
|
836
837
|
});
|
|
837
838
|
});
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
return storyElement["embed-url"];
|
|
841
|
-
}
|
|
842
|
-
return "";
|
|
839
|
+
|
|
840
|
+
return embedUrl;
|
|
843
841
|
}
|
|
844
842
|
|
|
845
843
|
function generateVideoArticleData(structuredData = {}, story = {}, publisherConfig = {}, timezone) {
|
package/package.json
CHANGED
|
@@ -255,25 +255,23 @@ function generateLiveBlogPostingData(structuredData = {}, story = {}, publisherC
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
function getEmbedUrl(cards) {
|
|
258
|
-
|
|
258
|
+
let embedUrl = "";
|
|
259
259
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
// not using the return value of top level find
|
|
261
|
+
// coz we only need the embed url
|
|
262
|
+
// find is used for early exit
|
|
263
|
+
cards.find((card) => {
|
|
263
264
|
const storyElements = card["story-elements"];
|
|
264
265
|
return storyElements.find((elem, index) => {
|
|
265
266
|
if (elem["embed-url"]) {
|
|
266
|
-
|
|
267
|
-
return
|
|
267
|
+
embedUrl = elem["embed-url"];
|
|
268
|
+
return true;
|
|
268
269
|
}
|
|
269
270
|
return false;
|
|
270
271
|
});
|
|
271
272
|
});
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
return storyElement["embed-url"];
|
|
275
|
-
}
|
|
276
|
-
return "";
|
|
273
|
+
|
|
274
|
+
return embedUrl;
|
|
277
275
|
}
|
|
278
276
|
|
|
279
277
|
|