(project)
| 67 | // if fixed, RevertModal will also need the fix |
| 68 | |
| 69 | setProjection (project) { |
| 70 | // TODO: ends up getting done twice, since the URL is modified and the @project is modified. So don't do this, just set project directly... (?) |
| 71 | if (project === this.project) { return } |
| 72 | let url = this.getURL() |
| 73 | if (!/project=/.test(url)) { url += '&project=' } |
| 74 | if (!/\?/.test(url)) { url = url.replace('&', '?') } |
| 75 | url = url.replace(/project=[^&]*/, `project=${(project != null ? project.join(',') : undefined) || ''}`) |
| 76 | if (!(project != null ? project.length : undefined)) { url = url.replace(/[&?]project=&/, '&') } |
| 77 | if (!(project != null ? project.length : undefined)) { url = url.replace(/[&?]project=$/, '') } |
| 78 | this.setURL(url) |
| 79 | this.project = project |
| 80 | } |
| 81 | |
| 82 | type () { |
| 83 | return this.constructor.className |
no test coverage detected