Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lexogrine/csgo-react-hud
Browse files Browse the repository at this point in the history
  • Loading branch information
osztenkurden committed Jan 27, 2021
2 parents 186d3fe + 6486295 commit 7cf3c97
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion craco.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path');
const fs = require('fs');
const pathToConfig = path.join(process.env.APPDATA, 'hud-manager', 'databases', 'config');
const homedir = require('os').homedir();
const pathToConfig = path.join(process.env.APPDATA || path.join(homedir, '.config'), 'hud-manager', 'databases', 'config');
let query = '';
if (fs.existsSync(pathToConfig)) {
try {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lexogrine_hud",
"version": "1.7.1",
"version": "1.8.0",
"homepage": "./",
"private": true,
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion public/hud.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"Lexogrine HUD",
"version":"1.7.1",
"version":"1.8.0",
"author":"Lexogrine",
"legacy": false,
"radar": true,
Expand Down
6 changes: 3 additions & 3 deletions src/HUD/SideBoxes/SideBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default class SideBox extends React.Component<{ side: 'left' | 'right', h
if(!data) return;
const display = data.display_settings;
if(!display) return;
if(display[`${this.props.side}_title`]){
if(`${this.props.side}_title` in display){
this.setState({title:display[`${this.props.side}_title`]})
}
if(display[`${this.props.side}_subtitle`]){
if(`${this.props.side}_subtitle` in display){
this.setState({subtitle:display[`${this.props.side}_subtitle`]})
}
if(display[`${this.props.side}_image`]){
if(`${this.props.side}_image` in display){
this.setState({image:display[`${this.props.side}_image`]})
}
});
Expand Down

0 comments on commit 7cf3c97

Please sign in to comment.