diff --git a/packages/relay-test-utils-internal/index.js b/packages/relay-test-utils-internal/index.js index 078bfb8905857..0111a7c86c1c0 100644 --- a/packages/relay-test-utils-internal/index.js +++ b/packages/relay-test-utils-internal/index.js @@ -49,7 +49,7 @@ function cannotReadPropertyOfUndefined__DEPRECATED( propertyName: string, ): string { const matches = process.version.match(/^v(\d+)\./); - const majorVersion = matches == null ? null : parseInt(matches[0], 10); + const majorVersion = matches == null ? null : parseInt(matches[1], 10); if (majorVersion == null || majorVersion < 16) { return `Cannot read property '${propertyName}' of undefined`; }