mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 09:06:51 +00:00
fix: oopsie
This commit is contained in:
@@ -7,13 +7,12 @@ This will eventually replace the old parser.
|
||||
|
||||
## Methods
|
||||
|
||||
#### parse(data: object, ctx?: any)
|
||||
#### parse(data: object)
|
||||
|
||||
Responsible for parsing specifically the `contents` property of the response object.
|
||||
|
||||
##### Arguments
|
||||
* `data` - the `contents` property.
|
||||
* `ctx` - optional, can be used to give additional context to the parser.
|
||||
|
||||
#### parseResponse(data: object)
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ class Parser {
|
||||
const keys = Object.keys(item);
|
||||
const classname = this.sanitizeClassName(keys[0]);
|
||||
|
||||
if (this.shouldIgnore(classname)) {
|
||||
if (!this.shouldIgnore(classname)) {
|
||||
try {
|
||||
const TargetClass = require('./classes/' + classname);
|
||||
results.push(new TargetClass(item[keys[0]]));
|
||||
|
||||
Reference in New Issue
Block a user