Skip to content

Commit

Permalink
Merge pull request #17426 from stukalin/master
Browse files Browse the repository at this point in the history
[BUGFIX beta] fix 'strict mode does not allow function declarations'
  • Loading branch information
rwjblue authored Jan 4, 2019
2 parents 5ebb3d6 + c9d9073 commit ad5f092
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ module.exports = {
'no-unused-vars': 'off',
'no-undef': 'off',

'no-inner-declarations': 'off',

'import/export': 'off',
'import/named': 'off',
'import/no-unresolved': 'off',
Expand Down
4 changes: 2 additions & 2 deletions packages/@ember/-internals/metal/tests/tracked/get_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AbstractTestCase, moduleFor } from 'internal-test-helpers';
import { get, getWithDefault, tracked } from '../..';

if (EMBER_METAL_TRACKED_PROPERTIES) {
function createObj() {
const createObj = function() {
class Obj {
@tracked string = 'string';
@tracked number = 23;
Expand All @@ -13,7 +13,7 @@ if (EMBER_METAL_TRACKED_PROPERTIES) {
}

return new Obj();
}
};

moduleFor(
'@tracked decorator: get',
Expand Down
16 changes: 8 additions & 8 deletions packages/@ember/-internals/routing/lib/services/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@ RouterService.reopen({
});

if (EMBER_ROUTING_ROUTER_SERVICE) {
const cleanURL = function(url: string, rootURL: string) {
if (rootURL === '/') {
return url;
}

return url.substr(rootURL.length, url.length);
};

RouterService.reopen(Evented, {
init() {
this._super(...arguments);
Expand Down Expand Up @@ -401,12 +409,4 @@ if (EMBER_ROUTING_ROUTER_SERVICE) {
@public
*/
});

function cleanURL(url: string, rootURL: string) {
if (rootURL === '/') {
return url;
}

return url.substr(rootURL.length, url.length);
}
}

0 comments on commit ad5f092

Please sign in to comment.