@balena/pinejs 21.0.0 → 21.0.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.
@@ -335,15 +335,13 @@ const prettifyConstraintError = (
335
335
  tableName +
336
336
  '" violates foreign key constraint ".*?" on table "(.*?)"',
337
337
  ).exec(err.message);
338
- if (keyMatches == null) {
339
- keyMatches = new RegExp(
340
- '"' +
341
- tableName +
342
- '" violates foreign key constraint "' +
343
- tableName +
344
- '_(.*?)_fkey"',
345
- ).exec(err.message);
346
- }
338
+ keyMatches ??= new RegExp(
339
+ '"' +
340
+ tableName +
341
+ '" violates foreign key constraint "' +
342
+ tableName +
343
+ '_(.*?)_fkey"',
344
+ ).exec(err.message);
347
345
  break;
348
346
  }
349
347
  }