Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit a617233

Browse files
committed
make it node 12 compatible
1 parent 750bcc2 commit a617233

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/corePlugins/ringWidth.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const dlv = require('dlv')
22
const nameClass = require('tailwindcss/lib/util/nameClass').default
3-
const transformThemeValue = require('tailwindcss/lib/util/transformThemeValue').default
43
const toRgba = require('tailwindcss/lib/util/withAlphaVariable').toRgba
54
const { asLength } = require('../pluginUtils')
65

@@ -20,8 +19,8 @@ module.exports = function ({ addBase, matchUtilities, addUtilities, jit: { theme
2019
let ringReset = {
2120
'*': {
2221
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
23-
'--tw-ring-offset-width': theme.ringOffsetWidth?.DEFAULT ?? '0px',
24-
'--tw-ring-offset-color': theme.ringOffsetColor?.DEFAULT ?? '#fff',
22+
'--tw-ring-offset-width': dlv(theme, ['ringOffsetWidth', 'DEFAULT'], '0px'),
23+
'--tw-ring-offset-color': dlv(theme, ['ringOffsetColor', 'DEFAULT'], '#fff'),
2524
'--tw-ring-color': ringColorDefault,
2625
'--tw-ring-offset-shadow': '0 0 #0000',
2726
'--tw-ring-shadow': '0 0 #0000',

src/lib/setupContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function getTailwindConfig(configOrPath) {
153153

154154
if (userConfigPath !== null) {
155155
let [prevConfig, prevModified = -Infinity, prevConfigHash] =
156-
configPathCache.get(userConfigPath) ?? []
156+
configPathCache.get(userConfigPath) || []
157157
let modified = fs.statSync(userConfigPath).mtimeMs
158158

159159
// It hasn't changed (based on timestamp)

0 commit comments

Comments
 (0)