-
Notifications
You must be signed in to change notification settings - Fork 353
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
6648 share compare #6678
base: main
Are you sure you want to change the base?
6648 share compare #6678
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,12 @@ export default class SplitItemReference extends ReferenceMixin( | |
} | ||
|
||
try { | ||
// Ensure the target we create is a concrete item | ||
// Ensure the target we create is a concrete item and check if we can return previousTarget | ||
if ( | ||
previousTarget !== undefined && | ||
sourceItem.uniqueId === this.splitSourceItemId | ||
Comment on lines
+56
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this check guarantee? Also, it's probably not a standard use-case of SplitItemReference, but if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This check is needed to prevent the second item (dragged from first to second in workbench) from stripping out the required dereferenced details, which is the cause of the bug. i.e. if there is a previousTarget passed in and the id's match return the previousTarget |
||
) | ||
return previousTarget; | ||
sourceItem = getDereferencedIfExists(sourceItem); | ||
return sourceItem.duplicateModel(this.uniqueId, this); | ||
} catch (e) { | ||
|
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.
It's better to note the bug that was fixed rather than a specific case of it (although it can be good list some specific use cases in a sub-list under the main bug fix entry). Sorry, I don't have a suggestion of a better changelog entry until I've understood the code change in SplitItemReference.ts.