@contentful/visual-sdk
Advanced tools
Comparing version 1.0.0-alpha.37 to 1.0.0-alpha.38
@@ -59,3 +59,7 @@ "use strict"; | ||
const unsubscribe = this.subscribe("REQUESTED_ENTITIES", (message)=>{ | ||
if (missing.every((id)=>message.entities.find((entity)=>entity.sys.id === id))) { | ||
const messageIds = [ | ||
...message.entities.map((entity)=>entity.sys.id), | ||
...message.missingEntityIds ?? [] | ||
]; | ||
if (missing.every((id)=>messageIds.find((entityId)=>entityId === id))) { | ||
clearTimeout(timeout); | ||
@@ -62,0 +66,0 @@ resolve(message.entities); |
@@ -41,3 +41,7 @@ function _define_property(obj, key, value) { | ||
const unsubscribe = this.subscribe("REQUESTED_ENTITIES", (message)=>{ | ||
if (missing.every((id)=>message.entities.find((entity)=>entity.sys.id === id))) { | ||
const messageIds = [ | ||
...message.entities.map((entity)=>entity.sys.id), | ||
...message.missingEntityIds ?? [] | ||
]; | ||
if (missing.every((id)=>messageIds.find((entityId)=>entityId === id))) { | ||
clearTimeout(timeout); | ||
@@ -44,0 +48,0 @@ resolve(message.entities); |
@@ -10,2 +10,3 @@ import type { Asset, Entry } from 'contentful'; | ||
entities: Array<Entry | Asset>; | ||
missingEntityIds?: string[]; | ||
}; | ||
@@ -12,0 +13,0 @@ export declare enum PostMessageMethods { |
@@ -69,3 +69,7 @@ import { EntityStore } from './EntityStore'; | ||
const unsubscribe = this.subscribe(PostMessageMethods.REQUESTED_ENTITIES, (message) => { | ||
if (missing.every((id) => message.entities.find((entity) => entity.sys.id === id))) { | ||
const messageIds = [ | ||
...message.entities.map((entity) => entity.sys.id), | ||
...(message.missingEntityIds ?? []), | ||
]; | ||
if (missing.every((id) => messageIds.find((entityId) => entityId === id))) { | ||
clearTimeout(timeout); | ||
@@ -72,0 +76,0 @@ resolve(message.entities); |
{ | ||
"name": "@contentful/visual-sdk", | ||
"author": "Contentful GmbH", | ||
"version": "1.0.0-alpha.37", | ||
"version": "1.0.0-alpha.38", | ||
"description": "Base SDK for building a visual SDK with contentful", | ||
@@ -59,3 +59,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "1a77d50f2108f0ca263aa61c1207eef7ccfd15b9" | ||
"gitHead": "c2ad0d60e2ab2ec6f0565d58a569d53525f5258b" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75603
2101