cspotcode / cspotcode/node-source-map-support

`retrieveFile` interprets empty string as "no response"

未关闭
#33 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
16
派生
4
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。