forked from jashkenas/backbone
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Backagain #1
Open
MarymagdalenaX
wants to merge
159
commits into
knows1:master
Choose a base branch
from
jashkenas:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Backagain #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix and test for issue #3961 - Collection#set - add events sends options.index that correspond to wrong index
fix and test for #3961 - add events sends options.index that correspond to wrong index
- modelId now takes the model in question as the second argument - modelId will look at the model in question's idAttribute before falling back to Collection.prototype.model.modelId and then 'id' - Makes basic polymorphic collection work out of the box while retaining backwards compatability
The event listener was missing a closing parenthesis in the preinitialize code sample for Collections.
Added missing parenthesis in the Collection preinitialize code example
Add check for `this.model.prototype`
Fixes #3882 Fixes #4159 Backbone does a bit of extra work to determine when to update `_byId` on every model change event because `change:id` will not work if `idAttribute` has changed. This causes issues as the `change` event happens after every `change:` event which means during a change the `_byId` hasn't updated. Rather than adding complexity to collection the solution is to have the model notify with the id changes. If adding a public event isn't desired, for an internal solution the model is aware of it's collection and could modify model.collection._byId directly within the set. Either of these solutions seem preferrable to handling `change:[idAttribute]` Replaces the need for: https://github.com/jashkenas/backbone/pull/4227/files#diff-c773bb9be277f0f3f2baa308b6e0f3a486790fe99fea81ddd0ba409846250571R1205
Add model changeId event
Replace Travis with GitHub Workflows
I mean, not exactly to the letter of the comments, but hopefully to the spirit.
Old trick learned from Underscore: within this directory, Node.js and other tools that follow its awkward convention will be willing to interpret .js files with ES module syntax.
Use allowed instead of whitelisted; Use disallowed instead of blacklisted;
Bump GitHub workflows to latest version
Trigger the "changeId" event only if prevId is different from this.id.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://www.facebook.com/profile.php?id=100041960793099