Skip to content

Commit

Permalink
fix crash on Android related to ES6 Symbol use (see facebook/react-na…
Browse files Browse the repository at this point in the history
  • Loading branch information
gr4yscale committed Jan 26, 2016
1 parent b7df66d commit 85f2069
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/redux/actions/shareActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ export function postIftttActionsToFriend(user, urlToShare, title) {
dispatch(iftttUserActionsRequest())

let requestPromises = []
for (let iftttUrl of iftttUrlsForUser(fullFriend)) {
let urls = iftttUrlsForUser(fullFriend)

for (let i = 0; i < urls.length; i++) {
let iftttUrl = urls[i]
let requestPromise = iftttRequest(urlToShare, iftttUrl, title, senderName)
// .then((response) => console.log('****', response))
requestPromises.push(requestPromise)
Expand Down Expand Up @@ -112,7 +115,8 @@ export function postAllIftttActions() {
let title = shareState.form.title

let actions = []
for (let friend of selectedFriends) {
for (let i = 0; i < selectedFriends.length; i++) {
let friend = selectedFriends[i]
actions.push(dispatch(postIftttActionsToFriend(friend, url, title)))
}

Expand All @@ -129,7 +133,9 @@ export function postAllIftttActions() {

function iftttUrlsForUser(user) {
let iftttUrls = []
for (let key of ['iftttUrl1', 'iftttUrl2', 'iftttUrl3']) {
let urlKeys = ['iftttUrl1', 'iftttUrl2', 'iftttUrl3']
for (let i = 0; i < urlKeys.length; i++) {
let key = urlKeys[i]
if (user[key]) {
iftttUrls.push(user[key])
}
Expand Down

0 comments on commit 85f2069

Please sign in to comment.