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

make it node 12 compatible #13

Merged
merged 2 commits into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
make it node 12 compatible
  • Loading branch information
RobinMalfait committed Mar 14, 2021
commit a6172336d25e4c69ff3731a4019d54693326efe9
5 changes: 2 additions & 3 deletions src/corePlugins/ringWidth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const dlv = require('dlv')
const nameClass = require('tailwindcss/lib/util/nameClass').default
const transformThemeValue = require('tailwindcss/lib/util/transformThemeValue').default
const toRgba = require('tailwindcss/lib/util/withAlphaVariable').toRgba
const { asLength } = require('../pluginUtils')

Expand All @@ -20,8 +19,8 @@ module.exports = function ({ addBase, matchUtilities, addUtilities, jit: { theme
let ringReset = {
'*': {
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
'--tw-ring-offset-width': theme.ringOffsetWidth?.DEFAULT ?? '0px',
'--tw-ring-offset-color': theme.ringOffsetColor?.DEFAULT ?? '#fff',
'--tw-ring-offset-width': dlv(theme, ['ringOffsetWidth', 'DEFAULT'], '0px'),
'--tw-ring-offset-color': dlv(theme, ['ringOffsetColor', 'DEFAULT'], '#fff'),
'--tw-ring-color': ringColorDefault,
'--tw-ring-offset-shadow': '0 0 #0000',
'--tw-ring-shadow': '0 0 #0000',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/setupContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function getTailwindConfig(configOrPath) {

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

// It hasn't changed (based on timestamp)
Expand Down