@braze/sanity-plugin-ai-translation 0.2.54 → 0.2.55
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.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -174,6 +174,11 @@ const isLoggingEnabled = () => process.env.NEXT_PUBLIC_SANITY_STUDIO_AI_TRANSLAT
|
|
|
174
174
|
selectedReferenceIds: action.payload
|
|
175
175
|
};
|
|
176
176
|
case "SET_TRANSLATION_JOB_STATUS": {
|
|
177
|
+
if (!action.payload._id)
|
|
178
|
+
return devLog.warn("SET_TRANSLATION_JOB_STATUS action missing _id", {
|
|
179
|
+
...logContext,
|
|
180
|
+
payload: action.payload
|
|
181
|
+
}), context;
|
|
177
182
|
const jobKey = `${undraftId(action.payload._id)}_${action.payload.language}`, newTranslationJobs = new Map(context.translationJobs), existingJob = newTranslationJobs.get(jobKey), mergedJob = defaults(action.payload, existingJob);
|
|
178
183
|
return newTranslationJobs.set(jobKey, mergedJob), {
|
|
179
184
|
...context,
|