From 81f51d5fc2df92504fbe0d4f0a8a85720efdae5c Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 21 Jan 2022 13:37:51 +0100 Subject: [PATCH] fix(nitro): update dot-prop import --- src/utils/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index dae925667c..183df8a848 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -6,7 +6,7 @@ import defu from 'defu' import { mergeHooks } from 'hookable' import consola from 'consola' import chalk from 'chalk' -import dotProp from 'dot-prop' +import { getProperty } from 'dot-prop' import type { NitroPreset, NitroInput } from '../context' export function hl (str: string) { @@ -20,7 +20,7 @@ export function prettyPath (p: string, highlight = true) { export function compileTemplate (contents: string) { return (params: Record) => contents.replace(/{{ ?([\w.]+) ?}}/g, (_, match) => { - const val = dotProp.get(params, match) + const val = getProperty(params, match) if (!val) { consola.warn(`cannot resolve template param '${match}' in ${contents.slice(0, 20)}`) }