Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cancan101 committed Dec 12, 2024
1 parent 6c539df commit f243d36
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions public/js/lib/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ var Class = (function() {

for ( var i = 0, length = properties.length; i < length; i++) {
var property = properties[i], value = source[property];
const method = value;
if (ancestor && isFunction(value)
&& argumentNames(value)[0] == "$super") {
var method = value;

value = wrap.bind((function(m) {
const method = ancestor[m];
Expand All @@ -78,10 +78,8 @@ var Class = (function() {
value.valueOf = method.valueOf.bind(method);
value.toString = method.toString.bind(method);
} else if (self && isFunction(value)
// TODO: reduce copy and patin here
&& argumentNames(value)[0] == "$this") {
var method = value;

// TODO: reduce copy and pasting here
value = wrap.bind((function(m) {
const method = self[m];
return function() {
Expand Down

0 comments on commit f243d36

Please sign in to comment.