projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check if success flag is true before accessing values.
[Sone.git]
/
src
/
main
/
resources
/
static
/
javascript
/
sone.js
diff --git
a/src/main/resources/static/javascript/sone.js
b/src/main/resources/static/javascript/sone.js
index
310e422
..
a7bfe08
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-110,7
+110,7
@@
function addCommentLink(postId, element) {
*/
function getTranslation(key, callback) {
$.getJSON("ajax/getTranslation.ajax", {"key": key}, function(data, textStatus) {
*/
function getTranslation(key, callback) {
$.getJSON("ajax/getTranslation.ajax", {"key": key}, function(data, textStatus) {
- if (
data != null
) {
+ if (
(data != null) && data.success
) {
callback(data.value);
}
}, function(xmlHttpRequest, textStatus, error) {
callback(data.value);
}
}, function(xmlHttpRequest, textStatus, error) {