Skip to content

Commit

Permalink
clear(), test this.paper, allows to call clear() on a cleared or not …
Browse files Browse the repository at this point in the history
…initialized graph
  • Loading branch information
uiteoi committed Sep 7, 2011
1 parent 84fb893 commit 14b318e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ico.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,11 @@ var Ico = {
},

clear: function() {
this.components_call( 'clear' );
this.paper.remove();
this.paper = null;
if ( this.paper ) {
this.components_call( 'clear' );
this.paper.remove();
this.paper = null;
}
return this
},

Expand Down

0 comments on commit 14b318e

Please sign in to comment.