Skip to content

Commit

Permalink
Remove unneeded await for call to synchronous browser.getUserDefinedR…
Browse files Browse the repository at this point in the history
…OIs()
  • Loading branch information
turner committed Jul 24, 2024
1 parent ec7b3df commit ebf8751
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dev/roi/roi-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3>User defined ROIs:</h3>
const list = document.createElement("ul")
div.appendChild(list)

const rois = await browser.getUserDefinedROIs()
const rois = browser.getUserDefinedROIs()
if (rois) {
for (let r of rois) {
const li = document.createElement('li')
Expand Down
4 changes: 2 additions & 2 deletions examples/roi/roi-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3>User defined ROIs:</h3>

<script type="module">

import igv from "../../dist/igv.esm.min.js"
import igv from "../../js/index.js"

const browser_config =
{
Expand Down Expand Up @@ -76,7 +76,7 @@ <h3>User defined ROIs:</h3>
const list = document.createElement("ul")
div.appendChild(list)

const rois = await browser.getUserDefinedROIs()
const rois = browser.getUserDefinedROIs()
if (rois) {
for (let r of rois) {
const li = document.createElement('li')
Expand Down
2 changes: 1 addition & 1 deletion js/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ class Browser {
}

/**
* Public API function. Return a promise for the list of user-defined regions-of-interest
* Public API function. Return list of user-defined regions-of-interest
*/
getUserDefinedROIs() {

Expand Down
2 changes: 1 addition & 1 deletion js/feature/featureTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class FeatureTrack extends TrackBase {

let color

if (this.browser.qtlSelections.hasPhenotype(f.name.toUpperCase())) {
if (f.name && this.browser.qtlSelections.hasPhenotype(f.name.toUpperCase())) {
color = this.browser.qtlSelections.colorForGene(f.name.toUpperCase())
} else if (this.altColor && "-" === feature.strand) {
color = (typeof this.altColor === "function") ? this.altColor(feature) : this.altColor
Expand Down

0 comments on commit ebf8751

Please sign in to comment.