Permit insertRecurrenceItemAt to insert one past the end of the current list,

in which case it acts as appendRecurrenceItem.  (This means that
insertRecurrenceItemAt(0, item) always works, even if there have been no items
added already.)
This commit is contained in:
shaver%mozilla.org 2005-07-07 14:01:19 +00:00
Родитель f1551c47b0
Коммит c62b130207
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -234,7 +234,7 @@ calRecurrenceInfo.prototype = {
if (this.mImmutable)
throw Components.results.NS_ERROR_OBJECT_IS_IMMUTABLE;
if (aIndex < 0 || aIndex >= this.mRecurrenceItems.length)
if (aIndex < 0 || aIndex > this.mRecurrenceItems.length)
throw Components.results.NS_ERROR_INVALID_ARG;
this.mRecurrenceItems.splice(aIndex, 0, aItem);