We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb5ce37 commit 8beaa58Copy full SHA for 8beaa58
src/main/java/com/contentstack/sdk/SyncStack.java
@@ -78,8 +78,13 @@ protected synchronized void setJSON(@NotNull JSONObject jsonobject) {
78
}
79
80
} else {
81
- logger.warning("'items' is not a valid list. Skipping processing."); // ✅ Prevent crashes
82
- syncItems = new ArrayList<>();
+ if (itemsObj instanceof JSONObject) {
+ syncItems = new ArrayList<>();
83
+ syncItems.add(sanitizeJson((JSONObject) itemsObj));
84
+ } else {
85
+ logger.warning("'items' is not a valid list. Skipping processing.");
86
87
+ }
88
89
90
syncItems = new ArrayList<>();
0 commit comments