Map doesnt work
Closed this issue · 6 comments
Hi,
In my code i am using the Map object quite alot after the change with the polyfills it stopped working in IE 11 and it throws an exception that Symbol is undefined.
From a look at aurelia-polyfills.js i saw that Map object should be supported.
For now i have added core js shim back to my code in the following way:
SystemJS.import('core-js/shim').then(function () {
SystemJS.import('aurelia-bootstrapper');
});
Can you please fix the Map object. Or provide a better way to import core js so i could load only the missing modules.
Try running jspm update
and see if that fixes it. Our code doesn't use
Symbols anymore. We had a bug earlier but that is now fixed. If the problem
persists it is probably because your code is using Symbol or possibly the
compiler you are using is generating code that uses Symbols and you will
need to include a polyfill.
On Mar 6, 2016 9:16 AM, "alexsurg" notifications@github.com wrote:
Hi,
In my code i am using the Map object quite alot after the change with the
polyfills it stopped working in IE 11 and it throws an exception that
Symbol is undefined.
From a look at aurelia-polyfills.js i saw that Map object should be
supported.
For now i have added core js shim back to my code in the following way:SystemJS.import('core-js/shim').then(function () {
SystemJS.import('aurelia-bootstrapper');
});Can you please fix the Map object. Or provide a better way to import core
js so i could load only the missing modules.—
Reply to this email directly or view it on GitHub
#6.
If you need to load only the missing modules from core JS, please see their
documentation which should explain how that works. It is designed to make
that possible.
On Mar 6, 2016 11:47 AM, "Rob Eisenberg" rob@bluespireconsulting.com
wrote:
Try running
jspm update
and see if that fixes it. Our code doesn't use
Symbols anymore. We had a bug earlier but that is now fixed. If the problem
persists it is probably because your code is using Symbol or possibly the
compiler you are using is generating code that uses Symbols and you will
need to include a polyfill.
On Mar 6, 2016 9:16 AM, "alexsurg" notifications@github.com wrote:Hi,
In my code i am using the Map object quite alot after the change with the
polyfills it stopped working in IE 11 and it throws an exception that
Symbol is undefined.
From a look at aurelia-polyfills.js i saw that Map object should be
supported.
For now i have added core js shim back to my code in the following way:SystemJS.import('core-js/shim').then(function () {
SystemJS.import('aurelia-bootstrapper');
});Can you please fix the Map object. Or provide a better way to import core
js so i could load only the missing modules.—
Reply to this email directly or view it on GitHub
#6.
About to release a new version that includes a Symbol polfyill as well as Symbol.iterator support for all collections.
Thanks for supporting Symbol. Unfortunately after i took the latest version and removed core JS from the code i started to get the following error almost on all my compiled files in the definition/registration section:
Error: Cannot read property 'Symbol(toStringTag)' of undefined
Can you please add support to Symbol.toStringTag or even better to all the Symbol function.
Thanks,
Alex
It should be supported already. Do you have the latest version? Can you show me what errors you are getting? What do you mean about the "definition/regitration" section?
I took the latest version: aurelia-polyfills@1.0.0-beta.1.0.2.
For example i use the kendo aurelia bridge, before the upgrade (from 1.0.1 to 1.0.2) it worked fine (in Chrome). now i get the following error:
Uncaught (in promise) TypeError: Cannot read property 'Symbol(toStringTag)' of undefined
Error loading http://localhost:32433/jspm_packages/npm/aurelia-kendoui-bridge@0.5.0/dropdownlist/dropdownlist.js
at descriptor.value (http://localhost:32433/jspm_packages/npm/aurelia-polyfills@1.0.0-beta.1.0.2/aurelia-polyfills.js:209:29)
at Function.Ye.define (http://localhost:32433/vendors/kendo-ui/js/kendo.data.min.js:9:12700)
at eval (http://localhost:32433/vendors/kendo-ui/js/kendo.data.min.js:10:12543)
at eval (http://localhost:32433/vendors/kendo-ui/js/kendo.data.min.js:10:19530)
at i (http://localhost:32433/jspm_packages/system.js:5:14999)
at i (http://localhost:32433/jspm_packages/system.js:5:2788)
at i (http://localhost:32433/jspm_packages/system.js:5:2750)
at i (http://localhost:32433/jspm_packages/system.js:5:2750)
at i (http://localhost:32433/jspm_packages/system.js:5:2750)
at n (http://localhost:32433/jspm_packages/system.js:5:1341)
In aurelia-polyfills.js here is the error:
(function (O, S) {
var dP = O.defineProperty,
ObjectProto = O.prototype,
toString = ObjectProto.toString,
toStringTag = 'toStringTag',
descriptor;
['iterator', 'match', 'replace', 'search', 'split', 'hasInstance', 'isConcatSpreadable', 'unscopables', 'species', 'toPrimitive', toStringTag].forEach(function (name) {
if (!(name in Symbol)) {
dP(Symbol, name, { value: Symbol(name) });
switch (name) {
case toStringTag:
descriptor = O.getOwnPropertyDescriptor(ObjectProto, 'toString');
descriptor.value = function () {
var str = toString.call(this),
tst = this[Symbol.toStringTag]; <-***This line
return typeof tst === 'undefined' ? str : '[object ' + tst + ']';
};
dP(ObjectProto, 'toString', descriptor);
break;
}
}
});
})(Object, Symbol);
If i remove the kendo aurelia bridge and just tring to import a kendo file:
import 'kendo-ui/js/kendo.multiselect.min.js';
Still get the same error:
Uncaught (in promise) TypeError: Cannot read property 'Symbol(toStringTag)' of undefined
Error loading http://localhost:32433/dist/app.js
at descriptor.value (http://localhost:32433/jspm_packages/npm/aurelia-polyfills@1.0.0-beta.1.0.2/aurelia-polyfills.js:209:29)
at Function.Ye.define (http://localhost:32433/vendors/kendo-ui/js/kendo.data.min.js:9:12700)
at eval (http://localhost:32433/vendors/kendo-ui/js/kendo.data.min.js:10:12543)
at eval (http://localhost:32433/vendors/kendo-ui/js/kendo.data.min.js:10:19530)
at i (http://localhost:32433/jspm_packages/system.js:5:14999)
at i (http://localhost:32433/jspm_packages/system.js:5:2788)
at i (http://localhost:32433/jspm_packages/system.js:5:2750)
at i (http://localhost:32433/jspm_packages/system.js:5:2750)
at n (http://localhost:32433/jspm_packages/system.js:5:1341)
at Object.execute (http://localhost:32433/jspm_packages/system.js:5:6206)
The error refer to the first line:
(function(System, SystemJS) {System.register(['aurelia-framework', 'aurelia-router', 'bootstrap', 'bootstrap/css/bootstrap.css!', 'jquery', 'kendo-ui/styles/kendo.common-bootstrap.min.css!', 'kendo-ui/styles/kendo.bootstrap.min.css!', 'kendo-ui/js/kendo.multiselect.min.js'], function (_export) {
'use strict';
var App;
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
return {
setters: [function (_aureliaFramework) {}, function (_aureliaRouter) {}, function (_bootstrap) {}, function (_bootstrapCssBootstrapCss) {}, function (_jquery) {}, function (_kendoUiStylesKendoCommonBootstrapMinCss) {}, function (_kendoUiStylesKendoBootstrapMinCss) {}, function (_kendoUiJsKendoMultiselectMinJs) {}],
execute: function () {
App = (function () {
function App() {
_classCallCheck(this, App);
}
_createClass(App, [{
key: 'configureRouter',
value: function configureRouter(config, router) {
config.title = 'Login';
config.map([{ route: ['', 'login'], name: 'login', moduleId: 'Modules/Login/login', title: 'Login' }, { route: 'proceduresList/:user', name: 'proceduresList', moduleId: 'Modules/ProceduresList/proceduresList', title: 'Procedures List' }, { route: 'patients/:user', name: 'patients', moduleId: 'Modules/Patients/patients', title: 'Patient List' }, { route: 'teachingPatients/:patient', name: 'teachingPatients', moduleId: 'Modules/TeachingPatients/teachingPatients', title: 'Teaching Patients' }]);
this.router = router;
}
}]);
return App;
})();
_export('App', App);
}
};
});
Also happens when i try to work with async/await and so on.