FIX: decorate user stream should include element
In the past we would call the decorate function with no element this made the extension on user stream pointless
This commit is contained in:
@@ -723,7 +723,12 @@ export function withPluginApi(version, apiCodeCallback, opts) {
|
||||
let _decorateId = 0;
|
||||
function decorate(klass, evt, cb) {
|
||||
const mixin = {};
|
||||
mixin["_decorate_" + (_decorateId++)] = function($elem) { cb($elem); }.on(evt);
|
||||
mixin["_decorate_" + (_decorateId++)] = function($elem) {
|
||||
$elem = $elem || this.$();
|
||||
if ($elem) {
|
||||
cb($elem);
|
||||
}
|
||||
}.on(evt);
|
||||
klass.reopen(mixin);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user