Daniel Werner has submitted this change and it was merged.
Change subject: (bug 44228) dataValues.util: Not using $.extend to set
constructor
......................................................................
(bug 44228) dataValues.util: Not using $.extend to set constructor
Setting the constructor in the inherit utility has to be done explicitly in
order to be
compatibly with IE8.
Change-Id: Id3d931c5349c33d9df39920f24c40645c0b90710
---
M DataValues/resources/dataValues.util.js
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Daniel Werner: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/DataValues/resources/dataValues.util.js
b/DataValues/resources/dataValues.util.js
index 10fabe7..b8d0ca5 100644
--- a/DataValues/resources/dataValues.util.js
+++ b/DataValues/resources/dataValues.util.js
@@ -66,9 +66,13 @@
NewConstructor.prototype = $.extend(
new NewPrototype(),
- members,
- { constructor: NewConstructor } // make sure
constructor property is set properly
+ members
);
+
+ // Make sure constructor property is set properly. The
constructor has to be assigned
+ // explicitly since doing it along the $.extend() above will be
ignored in IE8.
+ NewConstructor.prototype.constructor = NewConstructor;
+
return NewConstructor;
};
--
To view, visit https://gerrit.wikimedia.org/r/56412
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id3d931c5349c33d9df39920f24c40645c0b90710
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits