Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepEqual always returns true when comparing two booleans #532

Closed
radiantshaw opened this issue Apr 3, 2022 · 0 comments · Fixed by #533
Closed

deepEqual always returns true when comparing two booleans #532

radiantshaw opened this issue Apr 3, 2022 · 0 comments · Fixed by #533

Comments

@radiantshaw
Copy link
Contributor

The deepEqual function inside the src/tests/cases/log_controller_test_case.ts code:

function deepEqual(obj1: any, obj2: any): boolean {
if (obj1 === obj2) {
return true
} else {
if (Object.keys(obj1).length !== Object.keys(obj2).length) { return false }
for (var prop in obj1) {
if (!deepEqual(obj1[prop], obj2[prop])) {
return false
}
}
return true
}
}

always returns true when two boolean values are compared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant