cspotcode / cspotcode/node-source-map-support

`retrieveFile` interprets empty string as "no response"

Offen
#33 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
16
Forks
4
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.