Permalink
Browse files

Add check for random case where the fill.colors object doesn't exist

  • Loading branch information...
1 parent 24f662c commit ded481acb671fd47fdd449e9f22ce80cc00d6a4e Jason Johnston committed Aug 29, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 sources/BackgroundRenderer.js
@@ -259,7 +259,11 @@ PIE.BackgroundRenderer = PIE.RendererBase.newRenderer( {
fill['method'] = 'sigma';
fill['color'] = stops[0].color.colorValue( el );
fill['color2'] = stops[stopCount - 1].color.colorValue( el );
- fill['colors'].value = vmlColors.join( ',' );
+ if( fill['colors'] ) { //sometimes the colors object isn't initialized so we have to assign it directly (?)
+ fill['colors'].value = vmlColors.join( ',' );
+ } else {
+ fill['colors'] = vmlColors.join( ',' );
+ }
},

0 comments on commit ded481a

Please sign in to comment.