Skip to content

update() broken #20

@schulzch

Description

@schulzch

The update method has weird logic (see below). Moreover, it does not return this, as suggested in the documentation. If you want to keep setter and getter merged, you could test for arguments.length === 0 to return the property and this otherwise.

		update: function(redraw){
			if (redraw === true)
				this._redrawEnabled = false;

			if (redraw === false)
				this._redrawEnabled = true;

			return !!this._redrawEnabled;
		},

This simplifies to this._redrawEnabled = !redraw, which seems wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions