We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3487f40 commit 8c1f79bCopy full SHA for 8c1f79b
src/lib/validations/is-multisite-domain-mapped.ts
@@ -21,7 +21,8 @@ export const getPrimaryDomainFromSQL = ( statements: string[][] ): string => {
21
}
22
23
const SQL_WP_SITE_DOMAINS_REGEX = /\(1,'([^']+)'/s;
24
- const matches = SQL_WP_SITE_DOMAINS_REGEX.exec( statements[ 0 ].join( '' ).replace( /\s/g, '' ) );
+ const normalizedSql = statements[ 0 ]?.join( '' ).replace( /\s/g, '' ) ?? '';
25
+ const matches = SQL_WP_SITE_DOMAINS_REGEX.exec( normalizedSql );
26
return matches ? matches[ 1 ] : '';
27
};
28
0 commit comments