Skip to content

Commit 13f666b

Browse files
Merge pull request #700 from freeCodeCamp/main
Create a new pull request by comparing changes across two branches
2 parents 8771937 + 628b559 commit 13f666b

File tree

48 files changed

+70
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+70
-52
lines changed

api-server/src/server/boot/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function updateMyAbout(req, res, next) {
179179
// prevent dataurls from being stored
180180
const update = isURL(picture, { require_protocol: true })
181181
? { name, location, about, picture }
182-
: { name, location, about };
182+
: { name, location, about, picture: '' };
183183
return user.updateAttributes(
184184
update,
185185
createStandardHandler(req, res, next, 'flash.updated-about-me')

api/src/routes/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ ${isLinkSentWithinLimitTTL}`
494494
about: req.body.about,
495495
name: req.body.name,
496496
location: req.body.location,
497-
...(hasProtocol && { picture: req.body.picture })
497+
picture: hasProtocol ? req.body.picture : ''
498498
}
499499
});
500500

client/src/components/settings/about.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ class AboutSettings extends Component<AboutProps, AboutState> {
165165

166166
handlePictureChange = (e: React.ChangeEvent<HTMLInputElement>) => {
167167
const value = (e.target as HTMLInputElement).value.slice(0);
168-
if (isURL(value, { require_protocol: true })) {
168+
if (!value) {
169+
this.setState({
170+
isPictureUrlValid: true
171+
});
172+
} else if (isURL(value, { require_protocol: true })) {
169173
this.validationImage.src = encodeURI(value);
170174
} else {
171175
this.setState({

curriculum/challenges/english/07-scientific-computing-with-python/learn-interfaces-by-building-an-equation-solver/663a2dd1901cbeecc28748bd.md

Lines changed: 1 addition & 1 deletion

curriculum/challenges/english/07-scientific-computing-with-python/learn-interfaces-by-building-an-equation-solver/663a32735b317af9812eb0d7.md

Lines changed: 1 addition & 1 deletion

curriculum/challenges/english/07-scientific-computing-with-python/learn-interfaces-by-building-an-equation-solver/663b7fefd437bd984e091cbf.md

Lines changed: 1 addition & 1 deletion

curriculum/challenges/english/07-scientific-computing-with-python/learn-interfaces-by-building-an-equation-solver/664e4a590b52ba8d2adff19f.md

Lines changed: 1 addition & 1 deletion

curriculum/challenges/english/07-scientific-computing-with-python/learn-interfaces-by-building-an-equation-solver/664e4e1b6c35a99cbba49e84.md

Lines changed: 1 addition & 1 deletion

curriculum/challenges/english/07-scientific-computing-with-python/learn-interfaces-by-building-an-equation-solver/664ee8037f4bbe3c0944c35e.md

Lines changed: 1 addition & 1 deletion

curriculum/challenges/english/07-scientific-computing-with-python/learn-interfaces-by-building-an-equation-solver/664eec7f38234443b42c206f.md

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)