From 6e5dfccf75f84f619d3646188aef7ef7cf8f6376 Mon Sep 17 00:00:00 2001 From: Braden Shepherdson Date: Tue, 13 Feb 2024 06:25:52 -0500 Subject: [PATCH] Use sourceContents when non-null, even if it's an empty string (#17) --- lib/source-map-consumer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/source-map-consumer.js b/lib/source-map-consumer.js index 4bd7a4a5..db0a5324 100644 --- a/lib/source-map-consumer.js +++ b/lib/source-map-consumer.js @@ -1066,7 +1066,7 @@ IndexedSourceMapConsumer.prototype.sourceContentFor = var section = this._sections[i]; var content = section.consumer.sourceContentFor(aSource, true); - if (content) { + if (content || content === '') { return content; } }