Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-26 19:10:29 +01:00
Added IE11 polyfill to resolve client-side error that prevented wizard step from rendering
Dieser Commit ist enthalten in:
Ursprung
995df73d9e
Commit
eda320139f
1 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
|
@ -16,6 +16,18 @@ export default {
|
||||||
const autocomplete = requirejs('discourse/lib/autocomplete').default;
|
const autocomplete = requirejs('discourse/lib/autocomplete').default;
|
||||||
const cook = requirejs('discourse/plugins/discourse-custom-wizard/wizard/lib/text-lite').cook;
|
const cook = requirejs('discourse/plugins/discourse-custom-wizard/wizard/lib/text-lite').cook;
|
||||||
|
|
||||||
|
// IE11 Polyfill - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries#Polyfill
|
||||||
|
if (!Object.entries)
|
||||||
|
Object.entries = function( obj ){
|
||||||
|
var ownProps = Object.keys( obj ),
|
||||||
|
i = ownProps.length,
|
||||||
|
resArray = new Array(i); // preallocate the Array
|
||||||
|
while (i--)
|
||||||
|
resArray[i] = [ownProps[i], obj[ownProps[i]]];
|
||||||
|
|
||||||
|
return resArray;
|
||||||
|
};
|
||||||
|
|
||||||
$.fn.autocomplete = autocomplete;
|
$.fn.autocomplete = autocomplete;
|
||||||
|
|
||||||
// this is for discourse/lib/utilities.avatarImg;
|
// this is for discourse/lib/utilities.avatarImg;
|
||||||
|
|
Laden …
In neuem Issue referenzieren