Git Product home page Git Product logo

Comments (6)

Conanap avatar Conanap commented on June 11, 2024 1

Thanks @ldilley! The fix works perfectly. Please give me aheads up if possible when it gets deployed to npm. Many thanks for the prompt fix!

from minestat.

ldilley avatar ldilley commented on June 11, 2024

Thank you for reaching out, @Conanap. I just tested against a Minecraft server running version 1.4.7 with the ternary operator using nodejs v12.22.12. This test was also using the latest minestat.js code from master. I am unable to replicate your findings. See the screenshots below for details. The first instance of "Online" is while the server is running. The "Offline" output that follows is after I terminate the Minecraft server.

Is the variable's value or the result possibly cached in your webserver application (or browser) somehow?

image
image

from minestat.

Conanap avatar Conanap commented on June 11, 2024

Hey, thanks for the quick reply! I've refreshed the broswer as well and clear cache, but couldn't seem to get it to show as offline. The site makes a request for the updated status to the server every 10 seconds, and in the networking tab I can see that the response is "online" as well

image

Perhaps the server version may be the issue? Is there support for 1.19.x? Thanks!

from minestat.

ldilley avatar ldilley commented on June 11, 2024

After some discussion and testing with @mindsolve, it turns out that this is a bug if the interpreter is run interactively/persistently. The interpreter retains the true value until it exits (or the variable is explicitly reset). We have a small fix that I'll be pushing soon.

from minestat.

ldilley avatar ldilley commented on June 11, 2024

PR #131 has been submitted as a fix. Please let us know if that resolves your issue, @Conanap. If so, I'll ensure that the npm package gets updated as well.

from minestat.

ldilley avatar ldilley commented on June 11, 2024

You are most welcome, @Conanap. I am glad that the latest PR merge resolved your issue. Version 1.0.4 has also been published to the official npm repository.

from minestat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.