Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting a number value now renders a real number input #2091

Merged
merged 10 commits into from
Sep 2, 2023
Merged

Conversation

foxriver76
Copy link
Collaborator

@foxriver76 foxriver76 commented Sep 1, 2023

if (typeof obj.common.licenseUrl === 'object') {
obj.common.licenseUrl = obj.common.licenseUrl[I18n.getLanguage()] || obj.common.licenseUrl.en;
}
if (obj.common.licenseUrl.includes('github.com')) {

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization

'[github.com](1)' can be anywhere in the URL, and arbitrary hosts may come before or after it.
{devicesProgress >= 99
? `Lookup services - ${servicesProgress}%`
: `Lookup devices - ${devicesProgress}%`}
{disableScanner && (

Check warning

Code scanning / CodeQL

Useless conditional

This use of variable 'disableScanner' always evaluates to true.
onChange={e => this.setState({ targetValue: e.target.value })}
onKeyUp={e => e.keyCode === 13 && this.state.valid && this.onUpdate(e)}
onChange={e => {
this.setState({ targetValue: Number(e.target.value), valid: this.isNumberValid({ value: e.target.value, common: this.props.object.common }) });

Check warning

Code scanning / CodeQL

Potentially inconsistent state update

Component state update uses [potentially inconsistent value](1).
@@ -489,7 +529,7 @@
this.checkJsonError();
}

this.setState({ type: e.target.value });
this.setState({ type: e.target.value, valid: e.target.value === 'number' ? this.isNumberValid({ value: this.state.targetValue, common: this.props.object.common }) : true });

Check warning

Code scanning / CodeQL

Potentially inconsistent state update

Component state update uses [potentially inconsistent value](1). Component state update uses [potentially inconsistent value](2).
@foxriver76 foxriver76 merged commit 11da853 into master Sep 2, 2023
@foxriver76 foxriver76 deleted the issue-2083 branch September 2, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant