Toolbar: Check if `obj` is set before using it.
Props pento. See #44526. Built from https://develop.svn.wordpress.org/trunk@43556 git-svn-id: http://core.svn.wordpress.org/trunk@43385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
aab929b8d6
commit
071984839c
|
@ -303,9 +303,9 @@ if ( typeof(jQuery) != 'undefined' ) {
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*/
|
*/
|
||||||
var addEvent = function( obj, type, fn ) {
|
var addEvent = function( obj, type, fn ) {
|
||||||
if ( typeof obj.addEventListener === 'function' ) {
|
if ( obj && typeof obj.addEventListener === 'function' ) {
|
||||||
obj.addEventListener( type, fn, false );
|
obj.addEventListener( type, fn, false );
|
||||||
} else if ( typeof obj.attachEvent === 'function' ) {
|
} else if ( obj && typeof obj.attachEvent === 'function' ) {
|
||||||
obj.attachEvent( 'on' + type, function() {
|
obj.attachEvent( 'on' + type, function() {
|
||||||
return fn.call( obj, window.event );
|
return fn.call( obj, window.event );
|
||||||
} );
|
} );
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-43555';
|
$wp_version = '5.0-alpha-43556';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue