From b561b41b2a934072cc82577129de3dd3970b54cb Mon Sep 17 00:00:00 2001 From: jacooloff <40134663+jacooloff@users.noreply.github.com> Date: Sun, 25 Apr 2021 15:49:49 +0600 Subject: [PATCH] fix(#70): change inheritance order Fixing "Cannot read property 'value' of undefined" --- dist/subtotal.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dist/subtotal.js b/dist/subtotal.js index d4cdc99..68080bc 100644 --- a/dist/subtotal.js +++ b/dist/subtotal.js @@ -1,6 +1,18 @@ (function() { var callWithJQuery, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + extend = function(child, parent) { + for (var key in parent) { + if (hasProp.call(parent, key)) + child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + child.prototype = parent.prototype; + ctor.prototype = child.prototype; + child.__super__ = parent.prototype; + return child; + }, hasProp = {}.hasOwnProperty, slice = [].slice;