Skip to content

Commit

Permalink
RMET-2119 InAppBrowser Plugin - Check for element before obtaining it (
Browse files Browse the repository at this point in the history
…#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
  • Loading branch information
alexgerardojacinto authored Jan 18, 2023
1 parent fbe4b5a commit cb6ca43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### [Unreleased]
### Fix
- Android - InAppBrowser not opening when no options are passed - check for next element before trying to obtain. (https://outsystemsrd.atlassian.net/browse/RMET-2119)

### [4.0.0-OS12] - 2022-06-29
### Fix
- Removed hook that adds swift support and added the plugin as dependecy. (https://outsystemsrd.atlassian.net/browse/RMET-1680)
Expand Down
10 changes: 6 additions & 4 deletions src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,13 @@ private HashMap<String, String> parseFeature(String optString) {
option = new StringTokenizer(features.nextToken(), "=");
if (option.hasMoreElements()) {
String key = option.nextToken();
String value = option.nextToken();
if (!customizableOptions.contains(key)) {
value = value.equals("yes") || value.equals("no") ? value : "yes";
if(option.hasMoreElements()){
String value = option.nextToken();
if (!customizableOptions.contains(key)) {
value = value.equals("yes") || value.equals("no") ? value : "yes";
}
map.put(key, value);
}
map.put(key, value);
}
}
return map;
Expand Down

0 comments on commit cb6ca43

Please sign in to comment.