Skip to content

Commit c1fc48c

Browse files
Mamadukajsnajdr
andauthored
Core Data: Remove 'isRawAttribute' internal util (WordPress#76806)
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org>
1 parent 88656eb commit c1fc48c

File tree

4 files changed

+1
-36
lines changed

4 files changed

+1
-36
lines changed

packages/core-data/src/selectors.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { DEFAULT_ENTITY_KEY } from './entities';
2020
import { getUndoManager } from './private-selectors';
2121
import {
2222
getNormalizedCommaSeparable,
23-
isRawAttribute,
2423
setNestedValue,
2524
isNumericID,
2625
getUserPermissionCacheKey,
@@ -534,7 +533,7 @@ export const getRawEntityRecord = createSelector(
534533
// comparisons, and joins with edits easier.
535534
return Object.fromEntries(
536535
Object.keys( record ).map( ( _key ) => {
537-
if ( isRawAttribute( config, _key ) ) {
536+
if ( config.rawAttributes.includes( _key ) ) {
538537
const rawValue = record[ _key ]?.raw;
539538
return [
540539
_key,

packages/core-data/src/utils/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export { default as forwardResolver } from './forward-resolver';
55
export { default as onSubKey } from './on-sub-key';
66
export { default as replaceAction } from './replace-action';
77
export { default as withWeakMapCache } from './with-weak-map-cache';
8-
export { default as isRawAttribute } from './is-raw-attribute';
98
export { default as setNestedValue } from './set-nested-value';
109
export { default as getNestedValue } from './get-nested-value';
1110
export { default as isNumericID } from './is-numeric-id';

packages/core-data/src/utils/is-raw-attribute.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/core-data/src/utils/test/is-raw-attribute.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)