Permalink
Browse files

Flowify Process Color

Reviewed By: achen1

Differential Revision: D4924691

fbshipit-source-id: 11ff623be63062f01cb71c7d77e1438d3e495035
  • Loading branch information...
TheSavior authored and facebook-github-bot committed Apr 26, 2017
1 parent ec7a817 commit c7e0f56d75f81a5ea7be0c58abd506956f973a70
Showing with 10 additions and 7 deletions.
  1. +4 −2 Libraries/Share/Share.js
  2. +6 −5 Libraries/StyleSheet/processColor.js
View
@@ -12,12 +12,14 @@
'use strict';
const Platform = require('Platform');
const invariant = require('fbjs/lib/invariant');
const processColor = require('processColor');
const {
ActionSheetManager,
ShareModule
} = require('NativeModules');
const invariant = require('fbjs/lib/invariant');
const processColor = require('processColor');
type Content = { title?: string, message: string } | { title?: string, url: string };
type Options = { dialogTitle?: string, excludeActivityTypes?: Array<string>, tintColor?: string };
@@ -7,21 +7,22 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule processColor
* @flow
*/
'use strict';
var Platform = require('Platform');
const Platform = require('Platform');
var normalizeColor = require('normalizeColor');
const normalizeColor = require('normalizeColor');
/* eslint no-bitwise: 0 */
function processColor(color) {
function processColor(color?: string | number): ?number {
if (color === undefined || color === null) {
return color;
}
var int32Color = normalizeColor(color);
if (int32Color === null) {
let int32Color = normalizeColor(color);
if (int32Color === null || int32Color === undefined) {
return undefined;
}

0 comments on commit c7e0f56

Please sign in to comment.