WordPress.org

Make WordPress Core

Ticket #36631: 36631.diff

File 36631.diff, 506 bytes (added by joehoyle, 5 years ago)
  • src/wp-includes/js/wp-util.js

    diff --git a/src/wp-includes/js/wp-util.js b/src/wp-includes/js/wp-util.js
    index 84cb551..a703a85 100644
    a b window.wp = window.wp || {}; 
    3030                        };
    3131
    3232                return function ( data ) {
     33                        if ( ! document.getElementById( 'tmpl-' + id ) ) {
     34                                throw new Error( 'Template not found: ' + '#tmpl-' + id );
     35                        }
    3336                        compiled = compiled || _.template( $( '#tmpl-' + id ).html(), null, options );
    3437                        return compiled( data );
    3538                };