зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1036661 Accessing the loop panel for the first time triggers an error message in the console. r=dolske
This commit is contained in:
Родитель
f44669bab2
Коммит
6046b1a9ef
|
@ -1519,6 +1519,7 @@ pref("loop.enabled", false);
|
|||
#endif
|
||||
|
||||
pref("loop.server", "https://loop.services.mozilla.com");
|
||||
pref("loop.seenToS", "unseen");
|
||||
pref("loop.do_not_disturb", false);
|
||||
pref("loop.ringtone", "chrome://browser/content/loop/shared/sounds/Firefox-Long.ogg");
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
"privacy_notice_url": "www.mozilla.org/privacy/"
|
||||
});
|
||||
|
||||
if (!this.state.seenToS) {
|
||||
if (this.state.seenToS == "unseen") {
|
||||
navigator.mozLoop.setLoopCharPref('seenToS', 'seen');
|
||||
return React.DOM.p( {className:"terms-service",
|
||||
dangerouslySetInnerHTML:{__html: tosHTML}});
|
||||
|
|
|
@ -113,7 +113,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
"privacy_notice_url": "www.mozilla.org/privacy/"
|
||||
});
|
||||
|
||||
if (!this.state.seenToS) {
|
||||
if (this.state.seenToS == "unseen") {
|
||||
navigator.mozLoop.setLoopCharPref('seenToS', 'seen');
|
||||
return <p className="terms-service"
|
||||
dangerouslySetInnerHTML={{__html: tosHTML}}></p>;
|
||||
|
|
|
@ -48,7 +48,7 @@ describe("loop.panel", function() {
|
|||
return "en-US";
|
||||
},
|
||||
setLoopCharPref: sandbox.stub(),
|
||||
getLoopCharPref: sandbox.stub()
|
||||
getLoopCharPref: sandbox.stub().returns("unseen")
|
||||
};
|
||||
|
||||
document.mozL10n.initialize(navigator.mozLoop);
|
||||
|
|
Загрузка…
Ссылка в новой задаче