Make WordPress Core

Ticket #44745: 44745.diff

File 44745.diff, 807 bytes (added by adamsilverstein, 5 years ago)
  • src/js/_enqueues/wp/api.js

    diff --git src/js/_enqueues/wp/api.js src/js/_enqueues/wp/api.js
    index b877a8df2c..e10e8a7133 100644
     
    14121412                                                // Function that returns a constructed url passed on the parent.
    14131413                                                url: function() {
    14141414                                                        return routeModel.get( 'apiRoot' ) + routeModel.get( 'versionString' ) +
    1415                                                                         parentName + '/' + this.parent + '/' +
    1416                                                                         routeName;
    1417                                                 },
     1415                                                                parentName + '/' +
     1416                                                                ( ( _.isUndefined( this.parent ) || '' === this.parent ) ?
     1417                                                                        ( _.isUndefined( this.get( 'parent_post' ) ) ? '' : this.get( 'parent_post' ) + '/' ) :
     1418                                                                        this.parent + '/' ) +
     1419                                                          routeName;
     1420                                                  },
    14181421
    14191422                                                // Specify the model that this collection contains.
    14201423                                                model: function( attrs, options ) {