Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #265 from exop-group/ember-deprecations
Browse files Browse the repository at this point in the history
Replaced calls to the deprecated Ember.keys function with Object.keys
  • Loading branch information
jamesarosen committed Jul 6, 2015
2 parents 01f5aa5 + 57209b3 commit 32828b4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addon/get-locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Ember from 'ember';
const matchKey = '/locales/(.+)/translations$';

export default function getLocales() {
return Ember.keys(requirejs.entries).reduce((locales, module) => {
return Object.keys(requirejs.entries).reduce((locales, module) => {
var match = module.match(matchKey);
if (match) {
locales.pushObject(match[1]);
Expand Down
2 changes: 1 addition & 1 deletion addon/legacy-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (Ember.Helper == null) {
});

// observe any hash arguments that are streams:
Ember.keys(hash).forEach(function(key) {
Object.keys(hash).forEach(function(key) {
const value = hash[key];

if (value && value.isStream) {
Expand Down
4 changes: 2 additions & 2 deletions addon/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ function parentLocale(id) {
function withFlattenedKeys(object) {
const result = {};

Ember.keys(object).forEach(function(key) {
Object.keys(object).forEach(function(key) {
var value = object[key];

if (Ember.typeOf(value) === 'object') {
value = withFlattenedKeys(value);

Ember.keys(value).forEach(function(suffix) {
Object.keys(value).forEach(function(suffix) {
result[`${key}.${suffix}`] = value[suffix];
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion addon/macro.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Ember from "ember";

const keys = Ember.keys;
const keys = Object.keys;
const get = Ember.get;

// @public
Expand Down

0 comments on commit 32828b4

Please sign in to comment.