Skip to content

Commit

Permalink
FIX: .clear() was throwing an error due to change in variable name fr…
Browse files Browse the repository at this point in the history
…om 0.38.1.
  • Loading branch information
BrianMilton committed Jul 23, 2013
1 parent 51bbdf1 commit 86fefb6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions AMDLinkedList.js
Expand Up @@ -2,7 +2,7 @@
* LinkedList for JavaScript.
* Eventually this will completely emulate a regular Java linked list.
* Copyright 2013, Brian Milton
* Version: 0.38.1 (22nd July 2013)
* Version: 0.38.2 (22nd July 2013)
*/
define("LinkedList", function() {

Expand Down Expand Up @@ -113,10 +113,13 @@ define("LinkedList", function() {
* @return {void}
*/
LinkedList.prototype.clear = function() {
if(this._length === 0) {
return;
}
var head = this._head;
var tail = this._tail;
current.data = null;
current.next = null;
head.data = null;
head.next = null;
tail.data = null;
this._length = 0;
MODCOUNT++;
Expand Down
9 changes: 6 additions & 3 deletions LinkedList.js
Expand Up @@ -2,7 +2,7 @@
* LinkedList for JavaScript.
* Eventually this will completely emulate a regular Java linked list.
* Copyright 2013, Brian Milton
* Version: 0.38.1 (22nd July 2013)
* Version: 0.38.2 (22nd July 2013)
*/
(function() {

Expand Down Expand Up @@ -113,10 +113,13 @@
* @return {void}
*/
LinkedList.prototype.clear = function() {
if(this._length === 0) {
return;
}
var head = this._head;
var tail = this._tail;
current.data = null;
current.next = null;
head.data = null;
head.next = null;
tail.data = null;
this._length = 0;
MODCOUNT++;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@ JSLinkedList

Implementation of LinkedList in JavaScript. Eventually will emulate JavaSE 7's LinkedList type.

## Current version: 0.38.1
## Current version: 0.38.2

Version 1 will be considered ready when all of the items of the Method Summary are implemented.

Expand Down

0 comments on commit 86fefb6

Please sign in to comment.