Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update yamlparser.js #6

Merged
merged 1 commit into from

2 participants

@oddmarthon-lende

/home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:412
            if(m = lines[i].match(r)) {
                            ^
TypeError: Object function each(iterator, context) {
    var index = 0;
    try {
      this._each(function(value) {
        iterator.call(context, value, index++);
      });
    } catch (e) {
      if (e != $break) throw e;
    }
    return this;
  } has no method 'match'
    at preProcess (/home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:412:29)
    at Object.eval (/home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:434:19)
    at Object. (/home/lendodd/NOg/node_modules/ua-parser/js/index.js:7:16)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object. (/home/lendodd/NOg/routes/middleware.js:14:13)

@oddmarthon-lende oddmarthon-lende Update yamlparser.js
/home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:412
            if(m = lines[i].match(r)) {
                            ^
TypeError: Object function each(iterator, context) {
    var index = 0;
    try {
      this._each(function(value) {
        iterator.call(context, value, index++);
      });
    } catch (e) {
      if (e != $break) throw e;
    }
    return this;
  } has no method 'match'
    at preProcess (/home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:412:29)
    at Object.eval (/home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:434:19)
    at Object.<anonymous> (/home/lendodd/NOg/node_modules/ua-parser/js/index.js:7:16)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/lendodd/NOg/routes/middleware.js:14:13)
c8f2010
@h4evr h4evr merged commit ee65090 into h4evr:master
@h4evr
Owner

Thank you for the fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 18, 2012
  1. @oddmarthon-lende

    Update yamlparser.js

    oddmarthon-lende authored
    /home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:412
                if(m = lines[i].match(r)) {
                                ^
    TypeError: Object function each(iterator, context) {
        var index = 0;
        try {
          this._each(function(value) {
            iterator.call(context, value, index++);
          });
        } catch (e) {
          if (e != $break) throw e;
        }
        return this;
      } has no method 'match'
        at preProcess (/home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:412:29)
        at Object.eval (/home/lendodd/NOg/node_modules/ua-parser/node_modules/yamlparser/yamlparser.js:434:19)
        at Object.<anonymous> (/home/lendodd/NOg/node_modules/ua-parser/js/index.js:7:16)
        at Module._compile (module.js:449:26)
        at Object.Module._extensions..js (module.js:467:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:362:17)
        at require (module.js:378:17)
        at Object.<anonymous> (/home/lendodd/NOg/routes/middleware.js:14:13)
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  yamlparser.js
View
2  yamlparser.js
@@ -409,7 +409,7 @@ var YAML =
var r = regex["comment"];
for(var i in lines) {
- if(m = lines[i].match(r)) {
+ if(m = (typeof lines[i] === 'string' && lines[i].match(r))) {
/* var cmt = "";
if(typeof m[3] != "undefined")
lines[i] = m[1];
Something went wrong with that request. Please try again.