mirror of
https://github.com/usebruno/bruno.git
synced 2025-08-18 08:00:28 +02:00
fix: remove commented-out removeQuotes()
function
This commit is contained in:
@@ -22,12 +22,6 @@ const toNumber = (value) => {
|
|||||||
return Number.isInteger(num) ? parseInt(value, 10) : parseFloat(value);
|
return Number.isInteger(num) ? parseInt(value, 10) : parseFloat(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
// const removeQuotes = (str) => {
|
|
||||||
// if ((str.startsWith('"') && str.endsWith('"')) || (str.startsWith("'") && str.endsWith("'"))) {
|
|
||||||
// return str.slice(1, -1);
|
|
||||||
// }
|
|
||||||
// return str;
|
|
||||||
// };
|
|
||||||
|
|
||||||
const executeQuickJsVm = ({ script: externalScript, context: externalContext, scriptType = 'template-literal' }) => {
|
const executeQuickJsVm = ({ script: externalScript, context: externalContext, scriptType = 'template-literal' }) => {
|
||||||
if (!externalScript?.length || typeof externalScript !== 'string') {
|
if (!externalScript?.length || typeof externalScript !== 'string') {
|
||||||
@@ -44,8 +38,6 @@ const executeQuickJsVm = ({ script: externalScript, context: externalContext, sc
|
|||||||
if (externalScript === 'null') return null;
|
if (externalScript === 'null') return null;
|
||||||
if (externalScript === 'undefined') return undefined;
|
if (externalScript === 'undefined') return undefined;
|
||||||
|
|
||||||
// This is commented out as part of the fix for #3758
|
|
||||||
// externalScript = removeQuotes(externalScript);
|
|
||||||
|
|
||||||
const vm = QuickJSSyncContext;
|
const vm = QuickJSSyncContext;
|
||||||
|
|
||||||
@@ -95,8 +87,6 @@ const executeQuickJsVmAsync = async ({ script: externalScript, context: external
|
|||||||
if (externalScript === 'null') return null;
|
if (externalScript === 'null') return null;
|
||||||
if (externalScript === 'undefined') return undefined;
|
if (externalScript === 'undefined') return undefined;
|
||||||
|
|
||||||
// This is commented out as part of the fix for #3758
|
|
||||||
// externalScript = removeQuotes(externalScript);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const module = await newQuickJSWASMModule();
|
const module = await newQuickJSWASMModule();
|
||||||
|
@@ -85,16 +85,6 @@ const evaluateJsTemplateLiteral = (templateLiteral, context) => {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is commented out as part of the fix for #3758
|
|
||||||
// if (templateLiteral.startsWith('"') && templateLiteral.endsWith('"')) {
|
|
||||||
// return templateLiteral.slice(1, -1);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// This is commented out as part of the fix for #3758
|
|
||||||
// if (templateLiteral.startsWith("'") && templateLiteral.endsWith("'")) {
|
|
||||||
// return templateLiteral.slice(1, -1);
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (!isNaN(templateLiteral)) {
|
if (!isNaN(templateLiteral)) {
|
||||||
const number = Number(templateLiteral);
|
const number = Number(templateLiteral);
|
||||||
// Check if the number is too high. Too high number might get altered, see #1000
|
// Check if the number is too high. Too high number might get altered, see #1000
|
||||||
|
Reference in New Issue
Block a user