File tree 2 files changed +6
-4
lines changed 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 25
25
"deploy" : " gh-pages -d public" ,
26
26
"lint" : " eslint src" ,
27
27
"dist" : " babel src --out-dir lib --ignore demos" ,
28
- "prepublish" : " npm run dist"
28
+ "predeploy" : " npm run build" ,
29
+ "prepublishOnly" : " npm run dist"
29
30
},
30
31
"browserify" : {
31
32
"transform" : [
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export default class MtSvgLines extends React.Component {
68
68
69
69
this . _animStart = 0 // anim start timestamp
70
70
71
+ this . _svgWrapper = null
71
72
this . _pathElems = [ ]
72
73
this . _pathDataFrom = { }
73
74
this . _pathDataTo = { }
@@ -234,10 +235,10 @@ export default class MtSvgLines extends React.Component {
234
235
}
235
236
236
237
/*
237
- * Acquire selection of SVG 'path' elems contained within
238
+ * Acquire selection of 'path' elems contained within the SVG wrapper
238
239
*/
239
240
selectPathElems ( ) {
240
- const svgEl = this . _svgWrapper . getElementsByTagName ( 'svg' ) [ 0 ]
241
+ const svgEl = this . _svgWrapper && this . _svgWrapper . getElementsByTagName ( 'svg' ) [ 0 ]
241
242
return svgEl ? svgEl . querySelectorAll ( 'path' ) : [ ]
242
243
}
243
244
@@ -253,8 +254,8 @@ export default class MtSvgLines extends React.Component {
253
254
[ ] . forEach . call ( pathElems , ( pathEl , i ) => {
254
255
if ( ! this . hasSkipAttr ( pathEl . attributes ) ) {
255
256
const pathLengh = trimFloat ( pathEl . getTotalLength ( ) || 0 )
256
- pathData . to [ i ] = 0
257
257
pathData . from [ i ] = pathLengh
258
+ pathData . to [ i ] = 0
258
259
}
259
260
} )
260
261
You can’t perform that action at this time.
0 commit comments