소스 검색

refactor(always return store)

Ryan Chandler 5 년 전
부모
커밋
e2d09feea5
7개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 0
      dist/spruce.js
  2. 0 0
      dist/spruce.js.map
  3. 0 0
      dist/spruce.module.js
  4. 0 0
      dist/spruce.module.js.map
  5. 0 0
      dist/spruce.umd.js
  6. 0 0
      dist/spruce.umd.js.map
  7. 2 4
      src/index.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/spruce.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/spruce.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/spruce.module.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/spruce.module.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/spruce.umd.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/spruce.umd.js.map


+ 2 - 4
src/index.js

@@ -39,13 +39,11 @@ const Spruce = {
     },
 
     store: function (name, state) {
-        if (state === undefined && this.stores[name]) {
-            return this.stores[name]
-        }
-
         if (! this.stores[name]) {
             this.stores[name] = state
         }
+
+        return this.stores[name]
     },
 
     subscribe(el) {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.