Permalink
Browse files

Make localStorage availability optional (Framer for Android does not …

…support it)
  • Loading branch information...
eelco committed Jan 19, 2017
1 parent f3a1c68 commit f4db660026122d867e0f1fd39948f40a9203ee47
Showing with 3 additions and 3 deletions.
  1. +3 −3 framer/Components/ShareComponent.coffee
@@ -102,7 +102,7 @@ class ShareComponent
id: projectId
# See if a state is set
@state = localStorage.getItem("framerShareSheetState-#{@options.id}")
@state = localStorage?.getItem("framerShareSheetState-#{@options.id}")
@options.fixed = if not @state then false else true
@_checkData()
@@ -593,7 +593,7 @@ class ShareComponent
@close.onClick =>
@_closeSheet()
@options.fixed = true
localStorage.setItem("framerShareSheetState-#{@options.id}", "closed")
localStorage?.setItem("framerShareSheetState-#{@options.id}", "closed")
# Disable events propagating up to block unintented interactions
@sheet.onTouchStart (event) -> event.stopPropagation()
@@ -604,7 +604,7 @@ class ShareComponent
event.stopPropagation()
@_openSheet()
@options.fixed = true
localStorage.setItem("framerShareSheetState-#{@options.id}", "open")
localStorage?.setItem("framerShareSheetState-#{@options.id}", "open")
# When the window resizes evaluate if the sheet needs to be hidden
Canvas.onResize =>

0 comments on commit f4db660

Please sign in to comment.