File: fix-source-map-call.diff

package info (click to toggle)
node-grunt-contrib-concat 2.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 480 kB
  • sloc: javascript: 536; makefile: 7
file content (17 lines) | stat: -rw-r--r-- 584 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Fix source-map call with source-map ≥ 0.6
Author: Xavier Guimard <yadd@debian.org>
Bug-Debian: https://bugs.debian.org/878337
Forwarded: not-needed
Last-Update: 2019-02-10

--- a/tasks/lib/sourcemap.js
+++ b/tasks/lib/sourcemap.js
@@ -37,7 +37,7 @@
     this.file = file;
     this.generator = generator;
     this.addMapping = function(genLine, genCol, orgLine, orgCol, source, name) {
-      if (!source) {
+      if (!source || orgLine === null || orgCol === null) {
         generator.addMapping({
           generated: {line: genLine, column: genCol}
         });