Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-28 17:58:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b87df4cdd4f4342c2b3066b9fe75d91f5e055aaf
b87df4cd
1 parent
b6909ecb
add if statement
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
front/src/Routes/Chat/ChatContainer.js
front/src/Routes/Chat/ChatContainer.js
View file @
b87df4c
...
...
@@ -41,9 +41,13 @@ export default withRouter(({ location }) => {
roomId
:
roomNum
,
},
});
const
{
text
,
createdAt
}
=
messageObj
;
outcomingMsg
=
text
;
outcomingTime
=
createdAt
;
if
(
!
messageObj
)
{
toast
.
error
(
"fail to create new message !, try again"
);
}
else
{
const
{
text
,
createdAt
}
=
messageObj
;
outcomingMsg
=
text
;
outcomingTime
=
createdAt
;
}
}
catch
{
toast
.
error
(
"text must be not empty"
);
}
...
...
Please
register
or
login
to post a comment