|
@@ -733,7 +733,12 @@ class Stack {
|
|
|
* @param {*} newValue
|
|
|
*/
|
|
|
Push(newValue) {
|
|
|
- this.stack.push(newValue);
|
|
|
+ if(Array.isArray(newValue)) {
|
|
|
+ this.stack.push(...newValue);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.stack.push(newValue);
|
|
|
+ }
|
|
|
}
|
|
|
/**
|
|
|
* Wrapper function for Array.prototype.pop
|