Skip to content

Commit 3653f6f

Browse files
committed
Mimic nil data
1 parent 2cd5a0a commit 3653f6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Session.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ func (session *Session) Modified() bool {
6969

7070
// Data returns a copy of the underlying session data.
7171
func (session *Session) Data() map[string]interface{} {
72+
if session.data == nil {
73+
return nil
74+
}
75+
7276
newMap := map[string]interface{}{}
7377

7478
for key, value := range session.data {

0 commit comments

Comments
 (0)