mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 08:54:12 +01:00
Only fire truncate event from storage module if array is actually truncated.
This commit is contained in:
@@ -151,8 +151,8 @@ function ArrayStore(name, store)
|
|||||||
if(fromEnd)
|
if(fromEnd)
|
||||||
array.splice(0, array.length - length);
|
array.splice(0, array.length - length);
|
||||||
array.length = length;
|
array.length = length;
|
||||||
|
this.fireEvent("truncate", length);
|
||||||
}
|
}
|
||||||
this.fireEvent("truncate", length);
|
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user