Fix build
authorChocobozzz <me@florianbigard.com>
Wed, 18 Dec 2019 10:01:59 +0000 (11:01 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 18 Dec 2019 10:01:59 +0000 (11:01 +0100)
client/src/assets/player/upnext/upnext-plugin.ts
scripts/build/index.sh

index 1f070548141432cf9f0525a8843ee1ff7ecf4576..ba9afbe3de70347a7122191255de3fd1f158f0ca 100644 (file)
@@ -100,8 +100,8 @@ class EndCard extends Component {
     let now: number
     let newOffset: number
 
-    this.autoplayRing.setAttribute('stroke-dasharray', this.dashOffsetStart)
-    this.autoplayRing.setAttribute('stroke-dashoffset', -this.dashOffsetStart)
+    this.autoplayRing.setAttribute('stroke-dasharray', '' + this.dashOffsetStart)
+    this.autoplayRing.setAttribute('stroke-dashoffset', '' + -this.dashOffsetStart)
 
     this.title.innerHTML = this.getTitle()
 
@@ -127,8 +127,9 @@ class EndCard extends Component {
         clearTimeout(timeout)
         cb(false)
       } else {
-        newOffset = Math.max(-this.dashOffsetTotal, this.autoplayRing.getAttribute('stroke-dashoffset') - this.chunkSize)
-        this.autoplayRing.setAttribute('stroke-dashoffset', newOffset)
+        const strokeDashOffset = parseInt(this.autoplayRing.getAttribute('stroke-dashoffset'), 10)
+        newOffset = Math.max(-this.dashOffsetTotal, strokeDashOffset - this.chunkSize)
+        this.autoplayRing.setAttribute('stroke-dashoffset', '' + newOffset)
         timeout = setTimeout(update.bind(this), this.interval)
       }
 
index fde6efe320afd8c79730e62a2ff2b4a47b33b737..12359e68fb007e65ecf627f54a02d54667e349b2 100755 (executable)
@@ -2,6 +2,12 @@
 
 set -eu
 
-npm run concurrently -- -k \
-  "npm run build:client" \
+if [[ -n ${1+x} ]]; then
+  clientCommand="npm run build:client -- $1"
+else
+  clientCommand="npm run build:client"
+fi
+
+npm run concurrently -- --raw \
+  "$clientCommand" \
   "npm run build:server"