Skip to content

Commit

Permalink
Fixed array index.
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaei2000 committed Oct 22, 2024
1 parent c1baf15 commit e4d23f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions platform/src/ToolsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ class ToolManager {
* @return integer|null
*/
getPort(url_placeholder) {
var url_placeholder_regexp = url_placeholder.match(new RegExp(/{{BASE-URL}}:*[0-9]*/));
if (
url_placeholder.match(new RegExp(/{{BASE-URL}}:*[0-9]*/)) != null &&
url_placeholder_regexp != null &&
url_placeholder.indexOf(':') > 0
){
return url_placeholder.split(':')[1];
return url_placeholder_regexp[0].split(':')[1];
}

return null;
Expand Down

0 comments on commit e4d23f9

Please sign in to comment.