Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
4bfd8820
Commit
4bfd8820
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
Try to prevent computation erros and unexpected room changes
parent
d6c4d683
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/routes/roomRoute.coffee
+2
-2
2 additions, 2 deletions
client/routes/roomRoute.coffee
client/startup/startup.coffee
+2
-2
2 additions, 2 deletions
client/startup/startup.coffee
client/views/main.coffee
+12
-12
12 additions, 12 deletions
client/views/main.coffee
with
16 additions
and
16 deletions
client/routes/roomRoute.coffee
+
2
−
2
View file @
4bfd8820
...
...
@@ -7,11 +7,11 @@ FlowRouter.route '/room/:_id',
BlazeLayout
.
render
'main'
,
{
center
:
'loading'
}
Meteor
.
defer
->
track
=
Tracker
.
autorun
->
Tracker
.
autorun
(
c
)
->
if
RoomManager
.
open
(
params
.
_id
).
ready
()
isnt
true
return
track
?
.
stop
()
c
.
stop
()
if
not
ChatRoom
.
find
(
params
.
_id
).
count
()
FlowRouter
.
go
'home'
...
...
This diff is collapsed.
Click to expand it.
client/startup/startup.coffee
+
2
−
2
View file @
4bfd8820
...
...
@@ -33,9 +33,9 @@ Meteor.startup ->
Meteor
.
call
'loadLocale'
,
language
,
(
data
)
->
moment
.
locale
(
language
)
languageComputation
=
Tracker
.
autorun
->
Tracker
.
autorun
(
c
)
->
if
Meteor
.
user
()
?
.
language
?
languageComputation
.
stop
()
c
.
stop
()
localStorage
.
setItem
(
"userLanguage"
,
Meteor
.
user
().
language
)
setLanguage
Meteor
.
user
().
language
...
...
This diff is collapsed.
Click to expand it.
client/views/main.coffee
+
12
−
12
View file @
4bfd8820
Template
.
body
.
onRendered
->
dataLayerComputation
=
Tracker
.
autorun
->
Tracker
.
autorun
(
c
)
->
w
=
window
d
=
document
s
=
'script'
l
=
'dataLayer'
i
=
RocketChat
.
settings
.
get
'API_Analytics'
if
Match
.
test
(
i
,
String
)
and
i
.
trim
()
isnt
''
dataLayerComputation
?
.
stop
()
c
.
stop
()
do
(
w
,
d
,
s
,
l
,
i
)
->
w
[
l
]
=
w
[
l
]
||
[]
w
[
l
].
push
{
'gtm.start'
:
new
Date
().
getTime
(),
event
:
'gtm.js'
}
...
...
@@ -18,9 +18,9 @@ Template.body.onRendered ->
j
.
src
=
'//www.googletagmanager.com/gtm.js?id='
+
i
+
dl
f
.
parentNode
.
insertBefore
j
,
f
metaLanguageComputation
=
Tracker
.
autorun
->
Tracker
.
autorun
(
c
)
->
if
RocketChat
.
settings
.
get
'Meta:language'
metaLanguageComputation
?
.
stop
()
c
.
stop
()
Meta
.
set
name
:
'http-equiv'
property
:
'content-language'
...
...
@@ -30,33 +30,33 @@ Template.body.onRendered ->
property
:
'language'
content
:
RocketChat
.
settings
.
get
'Meta:language'
metaFBComputation
=
Tracker
.
autorun
->
Tracker
.
autorun
(
c
)
->
if
RocketChat
.
settings
.
get
'Meta:fb:app_id'
metaFBComputation
?
.
stop
()
c
.
stop
()
Meta
.
set
name
:
'property'
property
:
'fb:app_id'
content
:
RocketChat
.
settings
.
get
'Meta:fb:app_id'
metaRobotsComputation
=
Tracker
.
autorun
->
Tracker
.
autorun
(
c
)
->
if
RocketChat
.
settings
.
get
'Meta:robots'
metaRobotsComputation
?
.
stop
()
c
.
stop
()
Meta
.
set
name
:
'name'
property
:
'robots'
content
:
RocketChat
.
settings
.
get
'Meta:robots'
metaGoogleComputation
=
Tracker
.
autorun
->
Tracker
.
autorun
(
c
)
->
if
RocketChat
.
settings
.
get
'Meta:google-site-verification'
metaGoogleComputation
?
.
stop
()
c
.
stop
()
Meta
.
set
name
:
'name'
property
:
'google-site-verification'
content
:
RocketChat
.
settings
.
get
'Meta:google-site-verification'
metaMSValidateComputation
=
Tracker
.
autorun
->
Tracker
.
autorun
(
c
)
->
if
RocketChat
.
settings
.
get
'Meta:msvalidate.01'
metaMSValidateComputation
?
.
stop
()
c
.
stop
()
Meta
.
set
name
:
'name'
property
:
'msvalidate.01'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment