summaryrefslogtreecommitdiff
path: root/platform/script-debugger/backend/src/org/jetbrains/debugger/sourcemap/SourceMapDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/script-debugger/backend/src/org/jetbrains/debugger/sourcemap/SourceMapDecoder.java')
-rw-r--r--platform/script-debugger/backend/src/org/jetbrains/debugger/sourcemap/SourceMapDecoder.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/platform/script-debugger/backend/src/org/jetbrains/debugger/sourcemap/SourceMapDecoder.java b/platform/script-debugger/backend/src/org/jetbrains/debugger/sourcemap/SourceMapDecoder.java
index 27bd8abfe0ce..88ed91ce0580 100644
--- a/platform/script-debugger/backend/src/org/jetbrains/debugger/sourcemap/SourceMapDecoder.java
+++ b/platform/script-debugger/backend/src/org/jetbrains/debugger/sourcemap/SourceMapDecoder.java
@@ -5,6 +5,7 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.util.text.StringUtilRt;
import com.intellij.util.PathUtil;
import com.intellij.util.SmartList;
+import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.text.CharSequenceSubSequence;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -131,7 +132,12 @@ public final class SourceMapDecoder {
if (reader.peek() != JsonToken.END_ARRAY) {
sourcesContent = new SmartList<String>();
do {
- sourcesContent.add(StringUtilRt.convertLineSeparators(reader.nextString()));
+ if (reader.peek() == JsonToken.STRING) {
+ sourcesContent.add(StringUtilRt.convertLineSeparators(reader.nextString()));
+ }
+ else {
+ reader.skipValue();
+ }
}
while (reader.hasNext());
}
@@ -176,7 +182,7 @@ public final class SourceMapDecoder {
sourceToEntries[i] = new SourceMappingList(entries);
}
}
- return new SourceMap(file, new GeneratedMappingList(mappings), sourceToEntries, sourceResolverFactory.create(sources, sourcesContent));
+ return new SourceMap(file, new GeneratedMappingList(mappings), sourceToEntries, sourceResolverFactory.create(sources, sourcesContent), !ContainerUtil.isEmpty(names));
}
@Nullable
@@ -429,4 +435,4 @@ public final class SourceMapDecoder {
return MAPPING_COMPARATOR_BY_GENERATED_POSITION;
}
}
-} \ No newline at end of file
+}