Different method + fixed lint for tracker + added frame mode for shared URLs
This commit is contained in:
10
lib/web.js
10
lib/web.js
@@ -39,13 +39,11 @@ export const put = (url, params) => apiRequest('put', url, JSON.stringify(params
|
||||
|
||||
export const hook = (_this, method, callback) => {
|
||||
const orig = _this[method];
|
||||
_this[method] = (...args) => {
|
||||
callback.apply(null, args);
|
||||
return orig.apply(_this, args);
|
||||
};
|
||||
|
||||
return () => {
|
||||
_this[method] = orig;
|
||||
return (...args) => {
|
||||
callback.apply(null, args);
|
||||
|
||||
return orig.apply(_this, args);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user