Skip to content

Commit cb6ca43

Browse files
RMET-2119 InAppBrowser Plugin - Check for element before obtaining it (#40) (#41)
* fix: check if there's a next token before trying to obtain it References: https://outsystemsrd.atlassian.net/browse/RMET-2119 * chore: update changelog
1 parent fbe4b5a commit cb6ca43

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
### [Unreleased]
8+
### Fix
9+
- Android - InAppBrowser not opening when no options are passed - check for next element before trying to obtain. (https://outsystemsrd.atlassian.net/browse/RMET-2119)
10+
711
### [4.0.0-OS12] - 2022-06-29
812
### Fix
913
- Removed hook that adds swift support and added the plugin as dependecy. (https://outsystemsrd.atlassian.net/browse/RMET-1680)

src/android/InAppBrowser.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,13 @@ private HashMap<String, String> parseFeature(String optString) {
446446
option = new StringTokenizer(features.nextToken(), "=");
447447
if (option.hasMoreElements()) {
448448
String key = option.nextToken();
449-
String value = option.nextToken();
450-
if (!customizableOptions.contains(key)) {
451-
value = value.equals("yes") || value.equals("no") ? value : "yes";
449+
if(option.hasMoreElements()){
450+
String value = option.nextToken();
451+
if (!customizableOptions.contains(key)) {
452+
value = value.equals("yes") || value.equals("no") ? value : "yes";
453+
}
454+
map.put(key, value);
452455
}
453-
map.put(key, value);
454456
}
455457
}
456458
return map;

0 commit comments

Comments
 (0)