mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 14:25:17 +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
|
* @returns {Number} - the amount of removed elements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pop(quantity = -1) {
|
pop(amount = -1) {
|
||||||
if (!this.fields.length) {
|
if (!this.fields.length) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quantity > -1) {
|
if (amount > -1) {
|
||||||
let removedElements = this.fields.slice(quantity);
|
let removedElements = this.fields.slice(amount);
|
||||||
this.fields = this.fields.slice(0, this.fields.length - quantity);
|
this.fields = this.fields.slice(0, this.fields.length - amount);
|
||||||
this.uniqueKeys = this.uniqueKeys.slice(0, this.uniqueKeys - quantity);
|
this.uniqueKeys = this.uniqueKeys.slice(0, this.uniqueKeys - amount);
|
||||||
|
|
||||||
return removedElements;
|
return removedElements;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user