cspotcode / cspotcode/node-source-map-support

`retrieveFile` interprets empty string as "no response"

Aperta
#33 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
16
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

https://github.com/cspotcode/node-source-map-support/blob/817f84b2820e7395a274379cf80e79930e15d3b2/source-map-support.js#L147

https://github.com/cspotcode/node-source-map-support/blob/817f84b2820e7395a274379cf80e79930e15d3b2/source-map-support.js#L129-L135

If a file is empty, `retrieveFile` can return empty string. This is falsey, and today is erroneously interpreted as "no response," causing subsequent `retrieveFile` handlers to be invoked.

We can change `retrieveFile` to allow returning `undefined` and fix the logic to interpret empty string as empty file.

*Note:* Is a breaking change.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.