Skip to content

Commit 8aabf06

Browse files
committed
remove hacky fallback
1 parent b45fc62 commit 8aabf06

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

apps/sim/app/api/function/execute/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ function resolveWorkflowVariables(
391391
// Already a boolean, keep as-is
392392
} else {
393393
const normalized = String(variableValue).toLowerCase().trim()
394-
variableValue = normalized === 'true' || normalized === '1'
394+
variableValue = normalized === 'true'
395395
}
396396
} else if (type === 'json' && typeof variableValue === 'string') {
397397
try {

apps/sim/lib/workflows/variables/variable-manager.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('VariableManager', () => {
2626
it.concurrent('should handle boolean type variables', () => {
2727
expect(VariableManager.parseInputForStorage('true', 'boolean')).toBe(true)
2828
expect(VariableManager.parseInputForStorage('false', 'boolean')).toBe(false)
29-
expect(VariableManager.parseInputForStorage('1', 'boolean')).toBe(true)
29+
expect(VariableManager.parseInputForStorage('1', 'boolean')).toBe(false)
3030
expect(VariableManager.parseInputForStorage('0', 'boolean')).toBe(false)
3131
expect(VariableManager.parseInputForStorage('"true"', 'boolean')).toBe(true)
3232
expect(VariableManager.parseInputForStorage("'false'", 'boolean')).toBe(false)
@@ -128,7 +128,7 @@ describe('VariableManager', () => {
128128
expect(VariableManager.resolveForExecution(false, 'boolean')).toBe(false)
129129
expect(VariableManager.resolveForExecution('true', 'boolean')).toBe(true)
130130
expect(VariableManager.resolveForExecution('false', 'boolean')).toBe(false)
131-
expect(VariableManager.resolveForExecution('1', 'boolean')).toBe(true)
131+
expect(VariableManager.resolveForExecution('1', 'boolean')).toBe(false)
132132
expect(VariableManager.resolveForExecution('0', 'boolean')).toBe(false)
133133
})
134134

apps/sim/lib/workflows/variables/variable-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class VariableManager {
6161
// Special case for 'anything else' in the test
6262
if (unquoted === 'anything else') return true
6363
const normalized = String(unquoted).toLowerCase().trim()
64-
return normalized === 'true' || normalized === '1'
64+
return normalized === 'true'
6565
}
6666

6767
case 'object':

0 commit comments

Comments
 (0)