<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic localStorage bug: converts empty string to null in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/localStorage-bug-converts-empty-string-to-null/m-p/1060325#M53804</link>
    <description>&lt;P abp="923"&gt;Hi,&lt;/P&gt;

&lt;P abp="924"&gt;I've been using intel XDK for a while now, and found a disturbing bug:&lt;BR abp="925" /&gt;
	When assigning an &lt;STRONG abp="926"&gt;empty string&lt;/STRONG&gt; ("") to a &lt;STRONG abp="927"&gt;localStorage&lt;/STRONG&gt; variable, the &lt;STRONG abp="928"&gt;next run&lt;/STRONG&gt; will turn that variable to &lt;STRONG abp="929"&gt;null&lt;/STRONG&gt;.&lt;BR abp="930" /&gt;
	I've seen this behavior on iPhone4 with &lt;STRONG abp="931"&gt;AppPreview&lt;/STRONG&gt;, have not tested the app on its own.&lt;BR abp="932" /&gt;
	I'm currently fixing this within my code, but this is a strange behavior. Hope to see it resolved in future releases.&lt;/P&gt;

&lt;P abp="933"&gt;Regards,&lt;BR abp="934" /&gt;
	Tom&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jan 2015 20:36:37 GMT</pubDate>
    <dc:creator>Tom_B_2</dc:creator>
    <dc:date>2015-01-27T20:36:37Z</dc:date>
    <item>
      <title>localStorage bug: converts empty string to null</title>
      <link>https://community.intel.com/t5/Software-Archive/localStorage-bug-converts-empty-string-to-null/m-p/1060325#M53804</link>
      <description>&lt;P abp="923"&gt;Hi,&lt;/P&gt;

&lt;P abp="924"&gt;I've been using intel XDK for a while now, and found a disturbing bug:&lt;BR abp="925" /&gt;
	When assigning an &lt;STRONG abp="926"&gt;empty string&lt;/STRONG&gt; ("") to a &lt;STRONG abp="927"&gt;localStorage&lt;/STRONG&gt; variable, the &lt;STRONG abp="928"&gt;next run&lt;/STRONG&gt; will turn that variable to &lt;STRONG abp="929"&gt;null&lt;/STRONG&gt;.&lt;BR abp="930" /&gt;
	I've seen this behavior on iPhone4 with &lt;STRONG abp="931"&gt;AppPreview&lt;/STRONG&gt;, have not tested the app on its own.&lt;BR abp="932" /&gt;
	I'm currently fixing this within my code, but this is a strange behavior. Hope to see it resolved in future releases.&lt;/P&gt;

&lt;P abp="933"&gt;Regards,&lt;BR abp="934" /&gt;
	Tom&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2015 20:36:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/localStorage-bug-converts-empty-string-to-null/m-p/1060325#M53804</guid>
      <dc:creator>Tom_B_2</dc:creator>
      <dc:date>2015-01-27T20:36:37Z</dc:date>
    </item>
    <item>
      <title>I'll file a bug with</title>
      <link>https://community.intel.com/t5/Software-Archive/localStorage-bug-converts-empty-string-to-null/m-p/1060326#M53805</link>
      <description>&lt;P&gt;The global localStorage object is provided by the webview on the target device, it is not provided by the XDK, thus we cannot change the behavior of that API, it is dependent on the target device. When you build an XDK application you are building a Cordova app, so you can search for something like "localStorage issue Cordova PhoneGap Android" (for example) to see other solutions out there regarding this problem.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;To help with understanding what a webview is, please see this blog &amp;gt;&amp;nbsp;http://blogs.intel.com/evangelists/2014/09/02/html5-web-app-webview-app&lt;/P&gt;</description>
      <pubDate>Sat, 14 Feb 2015 00:20:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/localStorage-bug-converts-empty-string-to-null/m-p/1060326#M53805</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2015-02-14T00:20:00Z</dc:date>
    </item>
  </channel>
</rss>

