WordPress.org

Make WordPress Core

Changeset 43593


Ignore:
Timestamp:
08/30/2018 10:29:03 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Embeds: Avoid a JS error in wp.receiveEmbedMessage if data parameter is not set.

Props dsifford, kadamwhite.
Fixes #44832.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/embed.js

    r43347 r43593  
    3030    window.wp.receiveEmbedMessage = function( e ) {
    3131        var data = e.data;
    32         if ( ! ( data.secret || data.message || data.value ) ) {
     32        if ( ! data || ! ( data.secret || data.message || data.value ) ) {
    3333            return;
    3434        }
Note: See TracChangeset for help on using the changeset viewer.