소스 검색

chatview: use `utils.isPersistableModel`

JC Brand 8 년 전
부모
커밋
3e8e770517
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      src/converse-chatview.js

+ 1 - 3
src/converse-chatview.js

@@ -778,9 +778,7 @@
                 },
 
                 afterShown: function (focus) {
-                    if (this.model.collection.browserStorage) {
-                        // Without a connection, we haven't yet initialized
-                        // localstorage
+                    if (utils.isPersistableModel(this.model)) {
                         this.model.save();
                     }
                     this.setChatState(_converse.ACTIVE);