Removed GopherJS, basic frontend completed, need backend changes for

torrent storage
This commit is contained in:
2017-11-30 18:12:11 -05:00
parent 67fdef16b1
commit e98ad2cc88
69321 changed files with 5498914 additions and 337 deletions

View File

@@ -0,0 +1,30 @@
// @flow weak
function shallowRecursively(wrapper, selector, { context, ...other }) {
if (wrapper.isEmptyRender() || typeof wrapper.getElement().type === 'string') {
return wrapper;
}
let newContext = context;
const instance = wrapper.root().instance();
// The instance can be null with a stateless functional component and react >= 16.
if (instance && instance.getChildContext) {
newContext = {
...context,
...instance.getChildContext(),
};
}
const nextWrapper = wrapper.shallow({ context: newContext, ...other });
if (selector && wrapper.is(selector)) {
return nextWrapper;
}
return shallowRecursively(nextWrapper, selector, { context: newContext });
}
export default function until(selector, options = {}) {
return this.single('until', () => shallowRecursively(this, selector, options));
}