@quintype/seo 1.40.8 → 1.40.9-emb-url-fix.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/index.cjs.js CHANGED
@@ -829,8 +829,8 @@ function getEmbedUrl(cards) {
829
829
  // coz we only need the embed url
830
830
  // find is used for early exit
831
831
  cards.find(card => {
832
- const storyElements = card["story-elements"];
833
- return storyElements.find((elem, index) => {
832
+ const storyElements = get__default["default"](card, ["story-elements"], []);
833
+ return storyElements.find(elem => {
834
834
  if (elem["embed-url"]) {
835
835
  embedUrl = elem["embed-url"];
836
836
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/seo",
3
- "version": "1.40.8",
3
+ "version": "1.40.9-emb-url-fix.0",
4
4
  "description": "SEO Modules for Quintype",
5
5
  "main": "dist/index.cjs.js",
6
6
  "repository": "https://github.com/quintype/quintype-node-seo",
@@ -261,8 +261,8 @@ function getEmbedUrl(cards) {
261
261
  // coz we only need the embed url
262
262
  // find is used for early exit
263
263
  cards.find((card) => {
264
- const storyElements = card["story-elements"];
265
- return storyElements.find((elem, index) => {
264
+ const storyElements = get(card, ["story-elements"], []);
265
+ return storyElements.find((elem) => {
266
266
  if (elem["embed-url"]) {
267
267
  embedUrl = elem["embed-url"];
268
268
  return true;