question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parameter valueAsNumber not returning correct number.

See original GitHub issue

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.

  • I’m submitting a …

    • [X ] 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce

Create a CfnParameter with type 'Number' and a default value. Use that value somewhere with parameter.valueAsNumber Produces a value of -1.8881545897087546e+289

cosnt param = new CfnParameter(this, 'RedendtionPeriod', {
            description: 'SQS redention period in seconds 60 - 1209600 [14400]',
            type: 'Number',
            default: 14400,
            minValue: 60,
            maxValue: 1209600,
            constraintDescription: 'Must be between 60 and 1209600',
        });

param.valueAsNumber // -1.8881545897087546e+289
  • What is the expected behavior (or behavior of feature suggested)? Return the token for that value.

  • Please tell us about your environment:

    • CDK CLI Version: 1.2.0
    • Module Version: 1.2.0
    • OS: OSX Mojave
    • Language: Typescript

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
amwill04commented, Dec 17, 2019

@nagupta92 Ive reopened.

0reactions
amwill04commented, Apr 1, 2020

Ill open a better bug report

Read more comments on GitHub >

github_iconTop Results From Across the Web

type of event.target.value should be changed to integer in react
Actually there is a more direct way. You can simply get the value as a number without transforming it : event.target.valueAsNumber.
Read more >
NUMBERVALUE function - Microsoft Support
Description. Converts text to a number, in a locale-independent way. ... If any of the arguments are not valid, NUMBERVALUE returns the #VALUE!...
Read more >
Why the number input is the worst input - Stack Overflow Blog
valueAsNumber ` to access a numeric value. (It returns `NaN` for illegal values.) It also avoids the coercion foot-gun which means this is...
Read more >
769370 - implement valueAsNumber and valueAsDate for ...
This bug will need to deal with the conversions between string/date and string/number as described here http://www.whatwg.org/specs/web-apps/current-work/ ...
Read more >
4.10.7.2 Common input element attributes — HTML5 - W3C
On getting, if the valueAsNumber attribute does not apply, as defined for the input element's type attribute's current state, then return a Not-a-Number...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found