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

Don't skip on expirationTime == 0 #3785

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Schlepptop
Copy link

@Schlepptop Schlepptop commented Mar 4, 2024

Fixes #3784

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.76%. Comparing base (ee0450c) to head (81281fb).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3785      +/-   ##
==========================================
+ Coverage   86.64%   86.76%   +0.11%     
==========================================
  Files         240      240              
  Lines       32273    32273              
  Branches     1977     1981       +4     
==========================================
+ Hits        27963    28001      +38     
+ Misses       3376     3333      -43     
- Partials      934      939       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM
Copy link
Member

HarelM commented Mar 5, 2024

Thanks for taking the time to open this PR!
Can you please add a unit test to cover this case?

@@ -361,7 +361,7 @@ export class Tile {
this.expirationTime = new Date(data.expires).getTime();
}

if (this.expirationTime) {
if (this.expirationTime !== null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about undefined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache control for tiles: max-age=0 is ignored
3 participants