Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #45 from farwayer/color_fix
Browse files Browse the repository at this point in the history
fix parsing color in helpers:getColor()
  • Loading branch information
Ehesp committed May 6, 2016
2 parents cc304d9 + 696ef02 commit bd07132
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Platform } from 'react-native';
import processColor from 'processColor';

This comment has been minimized.

Copy link
@KGALLET

KGALLET May 6, 2016

uncaught error Error: UnableToResolveError: Unable to resolve module processColor from ../node_modules/react-native-material-design/lib/helpers.js: Unable to find this module in its module map or any of the node_modules directories under /Users/node_modules/processColor and its parent directories
import { PRIMARY, COLOR } from './config';

/**
Expand All @@ -8,7 +9,7 @@ import { PRIMARY, COLOR } from './config';
*/
export function getColor(string) {
if (string) {
if (string.indexOf('#') > -1 || string.indexOf('rgba') > -1) {
if (processColor(string) !== undefined)

This comment has been minimized.

Copy link
@KGALLET

KGALLET May 6, 2016

I think it's missing a { at the end : if (processColor(string) !== undefined) { which cause :

uncaught error Error: SyntaxError: ../node_modules/react-native-material-design/lib/helpers.js: 'return' outside of function (25:4) 
return string;
}

Expand Down Expand Up @@ -43,4 +44,4 @@ export function isCompatible(feature) {
return true;
break;
}
}
}

0 comments on commit bd07132

Please sign in to comment.