Skip to content

Commit

Permalink
Merge pull request Dexus#61 from shugigo/shugigo-patch-1
Browse files Browse the repository at this point in the history
No match fix at preg_match_all
  • Loading branch information
Dexus committed Sep 16, 2015
2 parents 89a4518 + dcabd92 commit 4f7a62c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pem.js
Expand Up @@ -779,7 +779,7 @@ function rtrim(str, charlist) {

function preg_match_all(regex, haystack) {
var globalRegex = new RegExp(regex, 'g');
var globalMatch = haystack.match(globalRegex);
var globalMatch = haystack.match(globalRegex) || [];
var matchArray = [],
nonGlobalRegex, nonGlobalMatch;
for (var i=0; i<globalMatch.length; i++) {
Expand Down

0 comments on commit 4f7a62c

Please sign in to comment.