Remove use of $.error in jquery-ui

This commit is contained in:
djmaze 2020-08-06 16:24:19 +02:00
parent e1b274fcb4
commit ae1b7610fd
3 changed files with 12 additions and 13 deletions

View file

@ -257,13 +257,13 @@ $.widget.bridge = function( name, object ) {
}
if ( !instance ) {
return $.error( "cannot call methods on " + name +
throw new Error( "cannot call methods on " + name +
" prior to initialization; " +
"attempted to call method '" + options + "'" );
}
if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name +
throw new Error( "no such method '" + options + "' for " + name +
" widget instance" );
}