mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
fix: minor typo in interpolator (#7473)
This commit is contained in:
parent
41911f00b0
commit
109258db41
@ -1,4 +1,5 @@
|
||||
import { getIntepolator } from './interpolator';
|
||||
import { getInterpolator } from './interpolator';
|
||||
|
||||
export class Environment {
|
||||
private _name: string;
|
||||
private kvs = new Map<string, boolean | number | string>();
|
||||
@ -33,7 +34,7 @@ export class Environment {
|
||||
};
|
||||
|
||||
replaceIn = (template: string) => {
|
||||
return getIntepolator().render(template, this.toObject());
|
||||
return getInterpolator().render(template, this.toObject());
|
||||
};
|
||||
|
||||
toObject = () => {
|
||||
@ -98,7 +99,7 @@ export class Variables {
|
||||
|
||||
replaceIn = (template: string) => {
|
||||
const context = this.toObject();
|
||||
return getIntepolator().render(template, context);
|
||||
return getInterpolator().render(template, context);
|
||||
};
|
||||
|
||||
toObject = () => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { fakerFunctions } from 'insomnia/src/ui/components/templating/faker-functions';
|
||||
import { configure, type ConfigureOptions, type Environment as NunjuncksEnv } from 'nunjucks';
|
||||
|
||||
class Intepolator {
|
||||
class Interpolator {
|
||||
private engine: NunjuncksEnv;
|
||||
|
||||
constructor(config: ConfigureOptions) {
|
||||
@ -50,7 +50,7 @@ class Intepolator {
|
||||
};
|
||||
}
|
||||
|
||||
const intepolator = new Intepolator({
|
||||
const interpolator = new Interpolator({
|
||||
autoescape: false,
|
||||
// Don't escape HTML
|
||||
throwOnUndefined: true,
|
||||
@ -65,6 +65,6 @@ const intepolator = new Intepolator({
|
||||
},
|
||||
});
|
||||
|
||||
export function getIntepolator() {
|
||||
return intepolator;
|
||||
export function getInterpolator() {
|
||||
return interpolator;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user