From 7fd2a51c4841389e6f9e2c6d307fd8402501e541 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Tue, 17 Oct 2023 20:33:47 +0900 Subject: [PATCH] Fix type error --- denops/dpp/dpp.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/denops/dpp/dpp.ts b/denops/dpp/dpp.ts index 765aadc..21e2ca7 100644 --- a/denops/dpp/dpp.ts +++ b/denops/dpp/dpp.ts @@ -591,7 +591,10 @@ function initPlugin(plugin: Plugin, basePath: string): Plugin { for ( const key of Object.keys(plugin).filter((key) => key.startsWith("hook_")) ) { - hooks[key] = hooks[key].replaceAll(/\n\s*\\/g, ""); + hooks[key] = (plugin[key as keyof typeof plugin] as string).replaceAll( + /\n\s*\\/g, + "", + ); } plugin = Object.assign(plugin, hooks);