mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-23 11:28:48 +02:00
fix(utils): Mutable variable must be non-const (#19)
This commit is contained in:
@@ -79,7 +79,7 @@ export function afterPatch(obj: any, name: string, fnc: (args: any[], ret: any)
|
||||
export function replacePatch(obj: any, name: string, fnc: (args: any[]) => any, options: PatchOptions = {}): void {
|
||||
const orig = obj[name];
|
||||
obj[name] = function (...args: any[]) {
|
||||
const ret = fnc.call(this, args);
|
||||
let ret = fnc.call(this, args);
|
||||
if (ret == 'CALL_ORIGINAL') ret = orig.call(this, ...args);
|
||||
if (options.singleShot) {
|
||||
unpatch(obj, name);
|
||||
|
||||
Reference in New Issue
Block a user