Skip to content

Fix undefined initialValue handling in Array.prototype.reduce and reduceRight function #569

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

Merged
merged 1 commit into from
Aug 14, 2015

Conversation

kkristof
Copy link
Contributor

JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com

@kkristof kkristof added bug Undesired behaviour ecma builtins Related to ECMA built-in routines labels Aug 13, 2015
@kkristof kkristof added this to the ECMA builtins milestone Aug 13, 2015
ecma_value_t accumulator = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);

/* 5. */
if (len_number == ECMA_NUMBER_ZERO && ecma_is_value_undefined (arg2))
if (len_number == ECMA_NUMBER_ZERO && ecma_is_value_undefined (initialValue))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, avoid usage of CamelCase. initial_value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed that.

@kkristof
Copy link
Contributor Author

I have updated the PR

@egavrin
Copy link
Contributor

egavrin commented Aug 13, 2015

Good to me.

@dbatyai
Copy link
Member

dbatyai commented Aug 14, 2015

lgtm

…uceRight function.

JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour ecma builtins Related to ECMA built-in routines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants