Ability to unregister umami
This commit is contained in:
1 parent
8727dbf282
commit
2ea91aaabf
2 files changed
+15
-5
No files matched your search
+5
-3
@@ -39,12 +39,14 @@ export const put = (url, params) => apiRequest('put', url, JSON.stringify(params
|
||||
|
||||
export const hook = (_this, method, callback) => {
|
||||
const orig = _this[method];
|
||||
|
||||
return (...args) => {
|
||||
_this[method] = (...args) => {
|
||||
callback.apply(null, args);
|
||||
|
||||
return orig.apply(_this, args);
|
||||
};
|
||||
|
||||
return () => {
|
||||
_this[method] = orig;
|
||||
};
|
||||
};
|
||||
|
||||
export const doNotTrack = () => {
|
||||
|
||||
Reference in new issue
Block a user