@salesforce/lds-worker-api 1.279.0 → 1.281.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/sfdc/es/ldsWorkerApi.js +16 -2
- package/dist/standalone/es/lds-worker-api.js +4833 -3041
- package/dist/standalone/umd/lds-worker-api.js +4833 -3041
- package/package.json +10 -10
|
@@ -379,8 +379,22 @@ function invokeAdapterWithDraftToReplace(adapterId, config, draftIdToReplace, on
|
|
|
379
379
|
draftIds !== undefined &&
|
|
380
380
|
draftIds.length > 0) {
|
|
381
381
|
const draftId = draftIds[draftIds.length - 1];
|
|
382
|
-
draftManager
|
|
382
|
+
draftManager
|
|
383
|
+
.replaceAction(draftIdToReplace, draftId)
|
|
384
|
+
.then(() => {
|
|
383
385
|
onResponse(responseValue);
|
|
386
|
+
})
|
|
387
|
+
.catch((error) => {
|
|
388
|
+
let message = 'Unknown error replacing draft';
|
|
389
|
+
if (error instanceof Error) {
|
|
390
|
+
message = error.message;
|
|
391
|
+
}
|
|
392
|
+
else if (typeof error === 'string') {
|
|
393
|
+
message = error;
|
|
394
|
+
}
|
|
395
|
+
onResponse({
|
|
396
|
+
error: createNativeFetchErrorResponse(message),
|
|
397
|
+
});
|
|
384
398
|
});
|
|
385
399
|
}
|
|
386
400
|
else {
|
|
@@ -1034,4 +1048,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1034
1048
|
}
|
|
1035
1049
|
|
|
1036
1050
|
export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
|
|
1037
|
-
// version: 1.
|
|
1051
|
+
// version: 1.281.0-9a56a08f0
|