Skip to content

Commit 2c6400e

Browse files
committed
Code review
1 parent d6083e2 commit 2c6400e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ public class RNInAppBrowser {
6464
private static final Pattern animationIdentifierPattern = Pattern.compile("^.+:.+/");
6565

6666
public Integer setColor(CustomTabsIntent.Builder builder, final ReadableMap options, String key, String method, String colorName) {
67-
String colorString = "";
67+
String colorString = options.getString(key);
6868
Integer color = null;
6969
try {
70-
if (options.hasKey(key)) {
71-
colorString = options.getString(key);
70+
if (colorString != null) {
7271
color = Color.parseColor(colorString);
7372
Method findMethod = builder.getClass().getDeclaredMethod(method, int.class);
7473
findMethod.invoke(builder, color);

0 commit comments

Comments
 (0)