protected resolveTo(to: RailNode | undefined) {
    if (this.to !== to) {
      this.unlinkTo();
    }
    this.linkTo(to);