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

Where is "anchor" coming from on line 18 of content-selector? #48

Closed
AshleyGrant opened this issue Apr 3, 2015 · 0 comments
Closed
Assignees
Labels

Comments

@AshleyGrant
Copy link
Collaborator

https://github.com/aurelia/templating/blob/master/src/content-selector.js#L18

function findInsertionPoint(groups, index){
  var insertionPoint;

  while(!insertionPoint && index >= 0){
    insertionPoint = groups[index][0];
    index--;
  }

  // this line
  return insertionPoint || anchor;
}

This came up during @cmichaelgraham's work on TypeScript. Just wondering if the || anchor part should be removed? Line 88 https://github.com/aurelia/templating/blob/master/src/content-selector.js#L88

var anchor = findInsertionPoint(this.groups, index) || this.anchor,

Looks to be the only place this function is called, so we're curious.

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

No branches or pull requests

2 participants