[Pkg-javascript-commits] [node-magic-string] 01/02: Add a patch to handle undefined chunks
Julien Puydt
julien.puydt at laposte.net
Sat Nov 4 16:03:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository node-magic-string.
commit e2c77230b22908afc792cb4e16abbe9b4942a2cc
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Sat Nov 4 16:50:12 2017 +0100
Add a patch to handle undefined chunks
---
debian/changelog | 6 ++++++
debian/patches/fix_undefined_chunk.patch | 14 ++++++++++++++
debian/patches/series | 1 +
3 files changed, 21 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 5fc30a7..18ce2f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+node-magic-string (0.22.4-4) unstable; urgency=medium
+
+ * Add patch to check undefined chunks.
+
+ -- Julien Puydt <julien.puydt at laposte.net> Sat, 04 Nov 2017 16:49:21 +0100
+
node-magic-string (0.22.4-3) unstable; urgency=medium
* Improve exports.
diff --git a/debian/patches/fix_undefined_chunk.patch b/debian/patches/fix_undefined_chunk.patch
new file mode 100644
index 0000000..3d9b9a6
--- /dev/null
+++ b/debian/patches/fix_undefined_chunk.patch
@@ -0,0 +1,14 @@
+Description: fix a problem where chunk gets undefined
+Author: Julien Puydt
+Forwarded: https://github.com/Rich-Harris/magic-string/issues/129
+
+--- a/src/MagicString.js
++++ b/src/MagicString.js
+@@ -524,6 +524,7 @@
+ const searchForward = index > chunk.end;
+
+ while ( true ) {
++ if (!chunk) return undefined;
+ if ( chunk.contains( index ) ) return this._splitChunk( chunk, index );
+
+ chunk = searchForward ?
diff --git a/debian/patches/series b/debian/patches/series
index 55be9d9..1aac6c6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
optional_argument.patch
+fix_undefined_chunk.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-magic-string.git
More information about the Pkg-javascript-commits
mailing list