Skip to content

Commit

Permalink
Fixing a bug where I forgot to parse out the hash
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMcMurder committed May 15, 2017
1 parent 9e6e564 commit a670722
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "single-spa-canopy",
"version": "1.10.0",
"version": "1.10.1",
"description": "Some helpers for single-spa child apps at canopy",
"main": "lib/single-spa-canopy.js",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/overlays.helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ function createOverlayWithText (opts, elementToAppendChild, classes) {
div.style.left = opts.overlay.left || 0
div.style.pointerEvents = 'none'
let backgroundColor
if (opts.overlay.color) {
backgroundColor = getRGBAFromHex(opts.overlay.color)
const hexRegex = /^#[A-Fa-f0-9]{6}$/g
if (opts.overlay.color && hexRegex.test(opts.overlay.color)) {
backgroundColor = getRGBAFromHex(opts.overlay.color.replace('#', ''))
} else if (opts.overlay.background) {
backgroundColor = opts.overlay.background
} else {
Expand Down

0 comments on commit a670722

Please sign in to comment.