We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 304afc8 + 114748b commit 56b42aeCopy full SHA for 56b42ae
src/data-structures/stack/Stack.js
@@ -16,7 +16,7 @@ export default class Stack {
16
* @return {*}
17
*/
18
peek() {
19
- if (!this.linkedList.tail) {
+ if (this.isEmpty()) {
20
return null;
21
}
22
0 commit comments