madden-franchise 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/FranchiseFile.js +8 -3
  2. package/package.json +1 -1
package/FranchiseFile.js CHANGED
@@ -295,9 +295,14 @@ class FranchiseFile extends EventEmitter {
295
295
  const hex = utilService.bin2hex(fullBinary);
296
296
 
297
297
  return this.tables.filter((table) => {
298
- return table.schema && table.schema.attributes.find((attribute) => {
299
- return attribute.type === referencedTable.name;
300
- });
298
+ if (table.schema) {
299
+ return table.schema && table.schema.attributes.find((attribute) => {
300
+ return attribute.type === referencedTable.name;
301
+ });
302
+ }
303
+ else if (table.isArray) {
304
+ return table.name.slice(0, table.name.length - 2) === referencedTable.name;
305
+ }
301
306
  }).filter((table) => {
302
307
  return table.data.indexOf(hex, 0, 'hex') !== -1;
303
308
  }).map((table) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "madden-franchise",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Tools to read a madden franchise file and get data from it",
5
5
  "main": "FranchiseFile.js",
6
6
  "scripts": {