Skip to content

Commit

Permalink
fix: revert #1379 (#1953)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede committed Sep 15, 2024
1 parent e0e5f82 commit 28a83ba
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/shared/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,8 @@ export const objectToString = Object.prototype.toString
export const toTypeString = (value: unknown): string =>
objectToString.call(value)

export const isPlainObject = (val: unknown): val is object => {
if (!isObject(val)) return false
const proto = Object.getPrototypeOf(val)
return proto === null || proto.constructor === Object
}
export const isPlainObject = (val: unknown): val is object =>
toTypeString(val) === '[object Object]'

// for converting list and named values to displayed strings.
export const toDisplayString = (val: unknown): string => {
Expand Down

0 comments on commit 28a83ba

Please sign in to comment.