abcjs 6.1.5 → 6.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abcjs",
3
- "version": "6.1.5",
3
+ "version": "6.1.6",
4
4
  "description": "Renderer for abc music notation",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -32,7 +32,7 @@ function getCoord(ev) {
32
32
 
33
33
  // when renderer.options.responsive === 'resize' the click coords are in relation to the HTML
34
34
  // element, we need to convert to the SVG viewBox coords
35
- if (svg.viewBox.baseVal) { // Firefox passes null to this when no viewBox is given
35
+ if (svg && svg.viewBox && svg.viewBox.baseVal) { // Firefox passes null to this when no viewBox is given
36
36
  // Chrome makes these values null when no viewBox is given.
37
37
  if (svg.viewBox.baseVal.width !== 0)
38
38
  scaleX = svg.viewBox.baseVal.width / svg.clientWidth
@@ -302,7 +302,7 @@ function mouseUp(ev) {
302
302
  var _ev = ev;
303
303
  if (ev.type === 'touchend' && this.lastTouchMove) {
304
304
  attachMissingTouchEventAttributes(this.lastTouchMove);
305
- if (this.lastTouchMove.touches.length > 0)
305
+ if (this.lastTouchMove && this.lastTouchMove.touches && this.lastTouchMove.touches.length > 0)
306
306
  _ev = this.lastTouchMove.touches[0];
307
307
  }
308
308
 
package/version.js CHANGED
@@ -1,3 +1,3 @@
1
- var version = '6.1.5';
1
+ var version = '6.1.6';
2
2
 
3
3
  module.exports = version;