# HG changeset patch # User Ludovic Chabant # Date 1646115077 28800 # Node ID 42396b88c64d6e46739b872bc17ad9ceab80b3d1 # Parent 6f7f35af6335f7e5bf1e45475f02e57564c5cd0e Don't unnecessarily capture the view reference in injected callbacks diff -r 6f7f35af6335 -r 42396b88c64d src/main.ts --- a/src/main.ts Mon Feb 28 22:10:14 2022 -0800 +++ b/src/main.ts Mon Feb 28 22:11:17 2022 -0800 @@ -138,7 +138,7 @@ var uninstall = around(view, { onUnloadFile: function(next) { return async function (unloaded: TFile) { - _this.rememberFileState(unloaded, view); + _this.rememberFileState(unloaded, this); return await next.call(this, unloaded); }; }