Skip to content

Commit

Permalink
refactor(portable-text-editor): remove uneccesary string usage
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin committed Sep 8, 2021
1 parent 6531f15 commit d66b7c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@sanity/portable-text-editor/src/utils/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import debug from 'debug'

const rootName = 'sanity-pte:'

export default debug('sanity-pte:')
export function debugWithName(name: string) {
export default debug(rootName)
export function debugWithName(name: string): debug.Debugger {
const namespace = `${rootName}${name}`
if (debug && debug.enabled(namespace)) {
return debug(namespace)
Expand Down

0 comments on commit d66b7c2

Please sign in to comment.