foliojs / fontkit

An advanced font engine for Node and the browser
1.44k stars 210 forks source link

remove duplicate axisIndex #313

Open bkniffler opened 1 year ago

rishi-raj-jain commented 5 months ago

@devongovett may you take a look at this one? Super easy to check and merge 🙏🏻

The duplicate axisIndex issue has been spotted by @lukasborawski in CF Pages deployment (while no errors locally).

Both, Vercel's next/font and Astro's astro-font would benefit from this.

lukasborawski commented 5 months ago

For full disclosure, I'm getting this error while building time in my app.

▲ [WARNING] Duplicate key "axisIndex" in object literal [duplicate-object-key]

    dist/$server_build/chunks/pages/index_faJsUSp6.mjs:9:81696:
      9 │ ...,Du=new R(o,{1:{axisIndex:o,axisIndex:o,filterRangeMinValue:v0,f...
        ╵                                ~~~~~~~~~

  The original key "axisIndex" is here:

    dist/$server_build/chunks/pages/index_faJsUSp6.mjs:9:81684:
      9 │ ...ataCount")}),Du=new R(o,{1:{axisIndex:o,axisIndex:o,filterRangeM...
        ╵                                ~~~~~~~~~