Skip to content

Commit 985204e

Browse files
url formate
1 parent 1a84178 commit 985204e

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/main/java/com/contentstack/utils/render/DefaultOption.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,8 @@ public String renderNode(String nodeType, JSONObject nodeObject, NodeCallback ca
116116

117117
private String getNodeStr(JSONObject nodeObject, String key) {
118118
String herf = nodeObject.optJSONObject("attrs").optString(key); // key might be [href/src]
119-
String url = nodeObject.optJSONObject("attrs").optString("url");
120119
if (herf == null || herf.isEmpty()) {
121-
herf = url;
120+
herf = nodeObject.optJSONObject("attrs").optString("url");
122121
}
123122
return herf;
124123
}

src/test/java/com/contentstack/utils/UtilTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.contentstack.utils;
22

3-
import com.contentstack.utils.callbacks.Option;
43
import com.contentstack.utils.embedded.StyleType;
54
import com.contentstack.utils.render.DefaultOption;
65
import org.json.JSONArray;

0 commit comments

Comments
 (0)