@blizzhackers/d2data 2.5.0 → 2.5.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.
package/compile.js CHANGED
@@ -133,9 +133,12 @@ files.forEach(fn => {
133
133
 
134
134
  if (key !== undefined) {
135
135
  if (key !== '') {
136
- if (obj[key]) {
137
- throw new Error('Duplicate key ' + JSON.stringify(key) + ' in ' + fn);
138
- } else {
136
+ while (obj[key]) {
137
+ console.warn('Duplicate key ' + JSON.stringify(key) + ' in ' + fn);
138
+ key += ' [dup]';
139
+ }
140
+
141
+ {
139
142
  let tmp = {};
140
143
 
141
144
  for (let c = 0; c < header.length; c++) {