Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Yoann HOUPERT
hublot
Commits
f84e062e
Commit
f84e062e
authored
Oct 10, 2017
by
Yoann HOUPERT
Browse files
clean code
parent
ad5dc0ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
client/robot/robot.js
client/robot/robot.js
+5
-5
No files found.
client/robot/robot.js
View file @
f84e062e
...
...
@@ -26,19 +26,19 @@ robot = {
processReco
(
reco
)
{
reco
=
JSON
.
parse
(
reco
);
let
formattedReco
=
''
;
let
p
reviousReco
=
[];
const
newP
reviousReco
=
[];
let
isRecom
=
false
;
if
(
reco
.
keywords
&&
reco
.
keywords
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
reco
.
keywords
.
length
;
i
++
)
{
if
(
!
isRecom
&&
robot
.
previousReco
.
indexOf
(
reco
.
keywords
[
i
].
key
)
===
-
1
)
{
if
(
!
isRecom
&&
robot
.
previousReco
.
indexOf
(
reco
.
keywords
[
i
].
key
)
===
-
1
)
{
isRecom
=
true
;
}
p
reviousReco
.
push
(
reco
.
keywords
[
i
].
key
);
newP
reviousReco
.
push
(
reco
.
keywords
[
i
].
key
);
}
robot
.
previousReco
=
p
reviousReco
;
robot
.
previousReco
=
newP
reviousReco
;
if
(
!
isRecom
){
if
(
!
isRecom
)
{
return
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment