WordPress.org

Make WordPress Core

Ticket #47216: 47216.2.patch

File 47216.2.patch, 461 bytes (added by splitti, 17 months ago)

Updated patch that follows the coding standards

  • packages/editor/src/utils/url.js

    diff --git a/packages/editor/src/utils/url.js b/packages/editor/src/utils/url.js
    index 371cdedc9..36a49794f 100644
    a b export function getWPAdminURL( page, query ) { 
    3939 * @return {string} Processed string
    4040 */
    4141export function cleanForSlug( string ) {
     42        if ( ! string ) {
     43                return;
     44        }
    4245        return toLower( deburr( trim( string.replace( /[\s\./_]+/g, '-' ), '-' ) ) );
    4346}