mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
restored changes
This commit is contained in:
parent
f148d57b29
commit
9a8870bfb2
@ -215,12 +215,11 @@
|
||||
//takes advantage of the fact the current `vnode` is the first argument in
|
||||
//all lifecycle methods.
|
||||
function callHook(vnode3) {
|
||||
if (typeof this !== 'function') return;
|
||||
var original = vnode3 ? vnode3.state : undefined;
|
||||
var original = vnode3.state;
|
||||
try {
|
||||
return this.apply(original, arguments);
|
||||
} finally {
|
||||
if (vnode3) checkState(vnode3, original);
|
||||
checkState(vnode3, original);
|
||||
}
|
||||
}
|
||||
// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when
|
||||
@ -1110,13 +1109,12 @@
|
||||
if (typeof source.onupdate === 'function') hooks.push(callHook.bind(source.onupdate, vnode3));
|
||||
}
|
||||
function shouldNotUpdate(vnode3, old) {
|
||||
if (!vnode3 || !old || !old.dom) return false;
|
||||
do {
|
||||
if (vnode3.attrs != null && typeof vnode3.attrs.onbeforeupdate === 'function') {
|
||||
var force = callHook.call(vnode3.attrs.onbeforeupdate, vnode3, old);
|
||||
if (force !== undefined && !force) break;
|
||||
}
|
||||
if (typeof vnode3.tag !== 'string' && vnode3.state && typeof vnode3.state.onbeforeupdate === 'function') {
|
||||
if (typeof vnode3.tag !== 'string' && typeof vnode3.state.onbeforeupdate === 'function') {
|
||||
var force = callHook.call(vnode3.state.onbeforeupdate, vnode3, old);
|
||||
if (force !== undefined && !force) break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user