-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix(): safeguard stack operations from foreign objects #9772
base: master
Are you sure you want to change the base?
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Build Stats
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asturur this is a fix, important for v6 IMO
Take a look
} | ||
} | ||
return idx; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is desired or should it fallback to
return idx; | |
return idx - 1; |
} | ||
} | ||
return idx; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same but
return idx; | |
return idx + 1; |
const idx = this._objects.indexOf(object); | ||
if (idx !== 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here for example when idx === -1
What i m asking is: |
Human error.
This will insert |
ok this i wanted to know, i don't think we should guard for an error of this kind. It would be like guarding devs that strokeWidth takes a number and not a string number, or valid color values for fill ('ciiaann is not a color') I m already half half on the other messages we have there and i always wanted them optional |
I am not sure I agree |
Description
closes #9730
Changed the conditions to be stricter to ban non children from entering the stack when called from stack operations
In Action