thanhlong203 / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

goog.cssom.replaceCssRule not working with an index of 0 #319

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The goog.cssom.replaceCssRule method does not work with an index of 0.

Apparantly it fails because of the if statement :

if (index) {
   goog.cssom.removeCssRule(parentStyleSheet, index);
   goog.cssom.addCssRule(parentStyleSheet, cssText, index);
} else {
   throw Error('Cannot proceed without the index of the cssRule.');
}

if index is equal to 0 the 'if(index)' returns false and then throw an 
exception.

Original issue reported on code.google.com by guillaum...@gmail.com on 4 May 2011 at 6:24

GoogleCodeExporter commented 8 years ago

Original comment by pall...@google.com on 6 May 2011 at 9:07

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r907.

Original comment by Nicholas.J.Santos on 7 May 2011 at 2:41

GoogleCodeExporter commented 8 years ago
thanks for the quick fix :)

Original comment by guillaum...@gmail.com on 8 May 2011 at 4:28