mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 13:25:19 +00:00
Renamed 'quantity' argument in 'amount' in fields
This commit is contained in:
10
fields.js
10
fields.js
@@ -50,15 +50,15 @@ class FieldsContainer {
|
||||
* @returns {Number} - the amount of removed elements
|
||||
*/
|
||||
|
||||
pop(quantity = -1) {
|
||||
pop(amount = -1) {
|
||||
if (!this.fields.length) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (quantity > -1) {
|
||||
let removedElements = this.fields.slice(quantity);
|
||||
this.fields = this.fields.slice(0, this.fields.length - quantity);
|
||||
this.uniqueKeys = this.uniqueKeys.slice(0, this.uniqueKeys - quantity);
|
||||
if (amount > -1) {
|
||||
let removedElements = this.fields.slice(amount);
|
||||
this.fields = this.fields.slice(0, this.fields.length - amount);
|
||||
this.uniqueKeys = this.uniqueKeys.slice(0, this.uniqueKeys - amount);
|
||||
|
||||
return removedElements;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user