After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730087 - HistoryManager method "lastItem" always returns <undefined>.
HistoryManager method "lastItem" always returns <undefined>.
Status: RESOLVED DUPLICATE of bug 781471
Product: gnome-shell
Classification: Core
Component: general
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-05-13 21:36 UTC by Aric S Marheine
Modified: 2018-07-19 10:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that makes HistoryManager.lastItem() return the last item in the history or <undefined> if the history is empty. (272 bytes, patch)
2014-05-13 21:36 UTC, Aric S Marheine
none Details | Review
Make HistoryManager.lastItem() never return a value. (277 bytes, patch)
2014-05-13 21:58 UTC, Aric S Marheine
none Details | Review

Description Aric S Marheine 2014-05-13 21:36:52 UTC
Created attachment 276478 [details] [review]
Patch that makes HistoryManager.lastItem() return the last item in the history or <undefined> if the history is empty.

Typo in js/misc/history.js causes HistoryManager.lastItem() to always return <undefined>.  The attached patch makes HistoryManager.lastItem() return the last item in the history or <undefined> if the history is empty.
Comment 1 Aric S Marheine 2014-05-13 21:58:26 UTC
Created attachment 276480 [details] [review]
Make HistoryManager.lastItem() never return a value.

Since HistoryManager.lastItem sets "_historyIndex" to the length of the array, lastItem() will always return <undefined>.  Instead make HistoryManager.lastItem() never return a value.
Comment 2 Florian Müllner 2018-07-19 10:33:04 UTC
This was fixed a while ago.

*** This bug has been marked as a duplicate of bug 781471 ***