Erros when using Entry Variable in craft.app.feeds.getFeedItems I'm processing some feeds using craft.app.feeds.getFeedItems() and it works if I pass the limit as a hard coded number like this:

{% set items = craft.app.feeds.getFeedItems(entry.rssURL, '5') %}
&lt;ul&gt;
    {% for item in items %}
      &lt;li&gt;&lt;a href="{{ item.permalink }}"&gt;{{ item.title }}&lt;/a&gt;&lt;/li&gt;
    {% endfor %} 
&lt;/ul&gt;


However if I change '5' to a field handle I get errors. where entry.feedLimit is a number such as 3 or 5

{% set items = craft.app.feeds.getFeedItems(entry.rssURL, entry.feedLimit) %}
&lt;ul&gt;
    {% for item in items %}
      &lt;li&gt;&lt;a href="{{ item.permalink }}"&gt;{{ item.title }}&lt;/a&gt;&lt;/li&gt;
    {% endfor %} 
&lt;/ul&gt;


The errors I get is:


  TypeError Argument 2 passed to craft\feeds\Feeds::getFeedItems() must
  be of the type integer or null, object given, called in
  /path/to/vendor/twig/twig/lib/Twig/Extension/Core.php
  on line 1619


This code was previously working on Craft 2, but after the update it is now broken. I've temporarily hard coded the limit in, but that's not ideal.
Solution is simple, the field type is a select so I need to change 

entry.feedLimit

to

entry.feedLimit.value

And then it works