diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -6,7 +6,6 @@ import * as THREE from 'three';
 class Line extends THREE.Line {
     // ref. https://stackoverflow.com/questions/31399856/drawing-a-line-with-three-js-dynamically
     constructor(maxPoints, color=0xff0000) {
-        this.version = __version;
         let geometry = new THREE.BufferGeometry();
         let positions = new Float32Array( maxPoints * 3 );
         geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
@@ -15,6 +14,7 @@ class Line extends THREE.Line {
         });
         super(geometry, material);
 
+        this.version = __version;
         this._maxPoints = maxPoints;
         this._numPoints = 0;
     }
Fix the runtime error due to `this.version` coming before `super()`