Skip to content

Commit

Permalink
Merge pull request #10 from dsgnr/undefined_env_var
Browse files Browse the repository at this point in the history
Fix undefined env variable in console log
  • Loading branch information
dsgnr authored Dec 10, 2021
2 parents 61ab8c5 + 9eee89e commit a1251f2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [1.0.9] - 2021-12-10

- Resolve console warning about undefined DEFAULT_PORT var in production

## [1.0.8] - 2021-12-10

- Add dependabot monitoring to repository
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
image: dsgnr/portcheckerio-ui:latest
pull_policy: always
container_name: portcheckerio
environment:
- DEFAULT_PORT=
ports:
- 80:80
restart: unless-stopped
2 changes: 1 addition & 1 deletion webui/src/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class HomePage extends Component {
portError: "",
showResults: false,
host: "",
ports: parseInt(process.env.DEFAULT_PORT),
ports: parseInt(process.env.DEFAULT_PORT) || "",
results: [],
msg: ""
};
Expand Down
2 changes: 1 addition & 1 deletion webui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
'process.env.DEFAULT_PORT': JSON.stringify(process.env.DEFAULT_PORT) || null
'process.env.DEFAULT_PORT': process.env.DEFAULT_PORT || null
}),
new HtmlWebpackPlugin({
hash: true,
Expand Down

0 comments on commit a1251f2

Please sign in to comment.