Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove non-existent keys polyfill #375

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions addon/adapters/base.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { keys } from '@ember/polyfills';
import RSVP from 'rsvp';
import { run } from '@ember/runloop';
import { isEmpty, typeOf } from '@ember/utils';
Expand All @@ -10,8 +9,6 @@ import {
} from 'ember-local-storage/helpers/import-export';
import { _buildKey } from 'ember-local-storage/helpers/storage';

const getKeys = Object.keys || keys;

// Ember data ships with ember-inflector
import { singularize, pluralize } from 'ember-inflector';

Expand Down Expand Up @@ -221,7 +218,7 @@ export default JSONAPIAdapter.extend({
const dataType = typeOf(data);

if (queryType === 'object' && dataType === 'object') {
return getKeys(query).every((key) => {
return Object.keys(query).every((key) => {
let queryValue = query[key],
recordValue;

Expand Down Expand Up @@ -261,7 +258,7 @@ export default JSONAPIAdapter.extend({
if (dataType === 'object') {
const queryMessage = query
.map(function (item) {
return getKeys(item).map(function (key) {
return Object.keys(item).map(function (key) {
return key + ': ' + item[key];
});
})
Expand Down
Loading