mirror of
https://github.com/danbulant/docker-compose
synced 2026-06-12 03:01:19 +00:00
refactor: replace variable by chaining
This commit is contained in:
parent
57f00b36fe
commit
b487be048b
1 changed files with 1 additions and 2 deletions
|
|
@ -83,8 +83,7 @@ export const mapPorts = (
|
|||
const result = !ports
|
||||
? []
|
||||
: (() => {
|
||||
const allPorts = ports.split(',')
|
||||
return allPorts.map((untypedPort) => {
|
||||
return ports.split(',').map((untypedPort) => {
|
||||
const exposedFragments = untypedPort.trim().split('->')
|
||||
const [port, protocol] =
|
||||
exposedFragments.length === 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue